home *** CD-ROM | disk | FTP | other *** search
/ Macwelt 1 / Macwelt DVD 1.toast / Web-Publishing / HTML-Editoren / Alpha ƒ / Help / Alpha Manual < prev    next >
Encoding:
Text File  |  2001-02-08  |  114.4 KB  |  2,849 lines

  1.  
  2. The Alpha Manual
  3.  
  4.                                                version: 7.4.1
  5.                                                created: 00-12-07 17.58.19
  6.                                            last update: 01-02-08 21.03.33
  7.  
  8.     Copyright © 1990-2001 Pete Keleher. All Rights Reserved
  9.         
  10. The Tcl code is copyright its respective authors
  11.  
  12.     Please note: 
  13.  
  14. The manual is always being updated, and is about 90% finished.  Other parts
  15. of the documentation still need a major overhaul.
  16.  
  17.     Legal notice
  18.  
  19. The Author(s) of this product are in no way liable for any direct or
  20. indirect damage caused by the product.
  21.  
  22. You may freely copy and distribute Alpha, but please bear in mind that
  23. Alpha is Shareware.  If you decide to keep it, please <<register>> your
  24. copy by selecting 'Register' from the 'About…' dialog.
  25.  
  26.  
  27.           Introduction
  28.  
  29.  
  30. Alpha is a very powerful, multi-purpose text editor.
  31.  
  32. Alpha is multi-modal, which means it switches between different modes
  33. depending on which type of document you are editing.  Everybody who has
  34. used Emacs knows about this concept.  The idea with different modes is to
  35. change Alpha's behavior depending on which kind of text you're editing. 
  36. For example if you're programming in C++ or editing a LaTeX document you
  37. want different features.
  38.  
  39. Alpha is very customizable.  Much of Alpha's functionality is implemented
  40. in 'packages' or 'extensions'.  The "Config --> Preferences --> Features"
  41. and "Config --> Mode Prefs --> Features" menu items let you see which items
  42. are installed, and lets you turn them on and off.
  43.  
  44. Alpha uses Dr.  Ousterhout's Tool Command Language (Tcl) as an extension
  45. language.  Many of the functions bound to keystrokes, as well as many of
  46. the functions in the menus, are written in Tcl.  All the "Packages" or
  47. "extensions" just mentioned are all written in Tcl.  Anybody who wants can
  48. write new packages for Alpha!
  49.  
  50. Of course, you don't have to learn Tcl to use Alpha.  You can have lots of
  51. use of Alpha without knowing anything about Tcl.  But if you want to become
  52. a real power user, you should consider trying it out.  Then the
  53. possibilities of customizing Alpha are unlimited.
  54.  
  55. Alpha contains source from many places, but in particular I'm grateful to
  56. Ray Johnson and Tim Endres for their working on porting TCL to the mac, and
  57. to Tom Scavo and Tom Pollard for their Tcl code contributions.  The
  58. following people have also provided considerable code and/or help debugging
  59. the one or two bugs Alpha has had: Masatsugu Nagata, Karl J. Smith, Eric
  60. Sink, David C. Black, Richard T. Austin, Henry Spencer, Vince Darley, Johan
  61. Linde, Tom Fetherston, Jon Guyer and Jerry Fowler.
  62.  
  63.  
  64.                How to navigate the documentation?
  65.  
  66.  
  67. This manual is divided into four major sections.  The first deals with
  68. Alpha's standard menu items, basic editing, and "international" issues. 
  69. The second addresses more Alpha specific behavior, such as file marking, 
  70. window management, and command (double) clicking.
  71.  
  72. The third section introduces "Modes" and "Packages", contained in the
  73. AlphaTcl library.  These are the items that sets Alpha apart from most text
  74. editors available -- many of these features are addressed in greater detail
  75. in other Help Menu items as well.  The final section contains information
  76. on changing or extending Alpha's behavior.
  77.  
  78. You can quickly jump between different sections of the manual by using the
  79. menu you find under the M icon at the right top of this window.  Also,
  80. Alpha supports a limited form of hypertext.  Clicking on green underlined
  81. text executes a command associated with the underlined text, usually taking
  82. you to other documentation, like this --> (jump to "Quick Start".) 
  83. Control-<period> will bring you back.
  84.  
  85.           
  86.     ======================================================================
  87.  
  88.  
  89.           Alpha's Menus
  90.  
  91.  
  92. This section is an explanation of Alpha's main menus, from "File" to
  93. "Windows" (menu with the window icons).  The menu items listed here are the
  94. ones available when no features are enabled in the (using the menu item
  95. "Config --> Preferences --> Features…").  Some of these features add new
  96. menu items or new submenus to Alpha's main menus.
  97.  
  98. Alpha uses Ramon Felciano's Mercury MDEF to display menus. In addition to
  99. allowing other modifiers to be shown in the menu, this MDEF also allows
  100. alternates, items that change depending on the state of the modifier keys.
  101. Alternate items are tagged below by the modifier that must be pressed to
  102. display it.
  103.  
  104.                File
  105.  
  106.  
  107.   New                           New file.
  108.   Open…                         Open file.
  109.   Close                         Close file.
  110.   Close All (option)            Close all files.
  111.   Close Float (shift)           Close a palette.
  112.  
  113.   Save                          Save file.
  114.   Save All (option)             Save all files.
  115.   Save Unmodified (control)     Save file without changing the modification 
  116.                                 date.
  117.   SaveAs…                       Prompt for name to same file under.
  118.   Save A Copy As… (option)      Save a copy of the open window.
  119.   Rename To… (shift)            Rename file.
  120.     
  121.   Revert                        Revert to last saved version, 
  122.                                   throw away undo history. 
  123.   Revert To Backup (option)     Revert to last backup copy, if any.
  124.         
  125.   File Utils
  126.  
  127.     File Remove…                Remove a file.
  128.     File Info…                  Display/edit info about a file.
  129.     Text to Alpha               Set creator of text files in a folder to Alpha.
  130.     Show in Finder              Select the front window in the Finder.
  131.  
  132.   Page Setup…                   Set print options.
  133.   Print…                        Print window.
  134.   Print All (option)            Print all windows.
  135.  
  136.   Quit                            Quit Alpha.
  137.  
  138.  
  139.                Edit
  140.  
  141.  
  142.   Undo                          Undo. 
  143.   Redo                          Redo. 
  144.  
  145.   Cut                           Cut selection to scrap.
  146.   Copy                          Copy selection to scrap.
  147.   Paste                         Paste from scrap.
  148.   Select All                    Select entire file.
  149.   Select Paragraph (option)     Select current paragraph.
  150.   Clear                         Delete selection.
  151.  
  152.   Twiddle                       Exchange characters bracketing the
  153.                                   selection point.
  154.   Twiddle Words (option)        Exchange words bracketing the selection point.
  155.  
  156.   Shift Left                    Shift selection left one tab.
  157.   Shift Left Space (option)     Shift selection left one space.
  158.   Shift Right                   Shift selection right one tab.
  159.   Shift Right Space (option)    Shift selection right one space.
  160.   Balance                       Select text out to the next set of 
  161.                                   matching braces.
  162.  
  163.  
  164.                Text
  165.  
  166.  
  167.   Fill Paragraph                "Fill" paragraph that contains the 
  168.                                   insertion point.
  169.   Wrap Paragraph (option)       Break lines longer than 'fillColumn' in 
  170.                                   paragraph containing the insertion point.
  171.   Sentence Paragraph (option-shift) - Forces each sentence to start on new 
  172.                                        line. 
  173.   Fill Region                   "Fill" selection subject to 'leftFillColumn'
  174.                                   and 'fillColumn'.
  175.   Wrap Region (option)          Break lines longer than 'fillColumn' in selection.
  176.   Sentence Region (option-shift) - Forces each sentence to start on new line. 
  177.  
  178.   Line To Paragraph             Convert a line to a paragraph.
  179.   Paragraph to Line (option)    Convert a paragraph to single line.
  180.     
  181.   Sort Lines                    Sort selected lines.
  182.   Reverse Sort (option)         Sort selected lines backwards.
  183.   Spellcheck Window             See the section below on "Spell Checking".
  184.   Spellcheck Selection (control)
  185.  
  186.   Zap Invisibles                 Delete all chars in file with ASCII code 
  187.                                   < 32, except for LF, TAB and CR.
  188.   Tabs To Spaces                Convert tabs to space runs.
  189.   Spaces To Tabs (option)       Convert space runs to tabs.
  190.  
  191.   Indent Line                   Indent the current line.
  192.   Indent Selection (option)     Indent the selection.
  193.     
  194.   Upcase Region                 Upcase all chars in region.
  195.   Downcase Region (option)      Downcase all chars in region.
  196.     
  197.   Strings
  198.  
  199.     Insert Prefix               Prepend string 'prefixString' to every line in 
  200.                                   selection.
  201.     Remove Prefix (option)      Remove prefix string from lines in selection. 
  202.     Insert Suffix               Append string 'suffixString' to every line in 
  203.                                   selection.
  204.     Remove Suffix (option)      Remove suffix string from lines in selection. 
  205.     Set Prefix                  Change prefix string.
  206.     Set Suffix                  Change suffix string.
  207.  
  208.   Comment Line                  Comment out line, considering mode.
  209.   Uncomment Line (option)       Un-comment line, considering mode.
  210.   Comment Box                   Create a comment box around selected text.
  211.   Uncomment Box (option)        Remove such a comment box.
  212.   Comment Paragraph             Comment out a paragraph.
  213.   Uncomment Paragraph           Uncomment a paragraph.
  214.  
  215.  
  216.                Search
  217.  
  218.  
  219.   Find…                         Present a search dialog.
  220.   Search Start (option)         Return selection point to where the last search 
  221.                                   started. 
  222.   Find Again                    Search forward again with same settings.
  223.   Find Again Backward (option)  Search backward again with same settings.
  224.   Find in Next File             Restart multiple-file search in next file after 
  225.                                   stopping at a match.
  226.   Enter Search String           Use the current selection as the search text.
  227.   Enter Replace String (option) Use the current selection as replace text.
  228.  
  229.   Quick Find                    Incremental search forward (grep, match words
  230.                                   off, ignore case on). Type chars to define 
  231.                                   string, control-w adds the current word to 
  232.                                   the search string, control-s/r search for 
  233.                                   the same string again.
  234.   Quick Find Regexp (option)    Same as Quick Find but lets you use a regular
  235.                                   expression.
  236.   Reverse Quick Find            Same thing in reverse.
  237.     
  238.   Replace                       Replace the selection.
  239.   Replace and Find Again        Replace the selection and search again forward.
  240.   Replace All                   Replace all of occurrences of the search string 
  241.                                   in the rest of the file.
  242.   Replace in Fileset (control)  Global replace in fileset.
  243.     
  244.   Place Bookmark                Set a book mark at the current position, 
  245.                                   pushing it onto a "stack".
  246.   Return to Bookmark            Pop last bookmark from stack and go to it.
  247.   Goto Line                     Go to specific line number.
  248.     
  249.   Matching Lines                Find all lines that match a regular expression 
  250.                                   and summarize in new window. 
  251.   Goto Match                    Jump to the original text specified by the
  252.                                   current line in a "Batch Find" or 
  253.                                   "Matching Lines" window.
  254.   Next Match                    Jump to the original text specified by the 
  255.                                   next line in a "Batch Find" or 
  256.                                   "Matching Lines" window.
  257.   Goto Func                     The same as selection an item in the Funcs menu
  258.                                   (the one with two curly braces at the right
  259.                                   top of the window)
  260.   Goto File Mark                The same as selection an item in the Marks menu
  261.                                   (the one with the M icon at the right top
  262.                                   of the window)
  263.   Mark Hilite                   Select text last manipulated, such as from
  264.                                    a paste.
  265.  
  266.   Named Marks->                 Manipulating named marks.
  267.  
  268.   Unnamed Marks
  269.  
  270.     Set…
  271.     Exchange Point And Mark
  272.  
  273.  
  274.                Utils
  275.  
  276.  
  277.   Compare
  278.  
  279.     Windows                     Compare top two windows, sending output to
  280.                                   a third.  Selecting a line in the third 
  281.                                   window and hitting return (or enter) moves
  282.                                   that line to the top of the window.
  283.     Files                       Same as above, but prompts for files.
  284.     Directories                 As above, but works for entire folders. 
  285.     
  286.   Win Utils
  287.  
  288.     Insert Path Name…           Prompt for a file and insert complete pathname
  289.                                 in window.
  290.     Insert File…                Insert the text of another file.
  291.     
  292.   Ascii Etc
  293.  
  294.     Quote Char                  Wait for key press and insert key.
  295.     Key Code                    Wait for key press and insert keycode
  296.                                   and modifier string suitable for key binding.
  297.     Key Ascii                   Same as above, but use ascii form.
  298.     Get Ascii                   Display ascii code for char to right of 
  299.                                   insertion point.
  300.    Insert Ascii                 Prompt for ascii code and insert character.
  301.         
  302.   Shell                         Start up command-line shell that interprets Tcl 
  303.                                   commands. The shell has a few csh-type
  304.                                   features, such as 'ls', 'rm', etc. commands,
  305.                                   as well as file completion with the TAB key. 
  306.   Toolserver Shell (control)    See the "Shells" help file.
  307.   Calculator (shift)            See the "Calculator Help" file.
  308.     
  309.   Word Count                    Count lines, words, chars in window.
  310.   Send URL                      Send selection as URL to proper internet
  311.                                   application.
  312.   Cmd-Double Click              See the section below on 
  313.                                   'Command-double-clicking".
  314.                             
  315.                Config
  316.  
  317.  
  318.   Preferences                   Set global preferences.
  319.  
  320.     Menus…                      Change global menus.
  321.     Features…                   Change global features.
  322.     Suffix Mappings…            Displays and allows editing of suffixes (really
  323.                                   filename patterns) for all existing modes.
  324.     Save Preferences Now        Save any preferences set during this session.
  325.     Edit Prefs File             Put your own arbitrary startup code here. 
  326.                                 Loaded after all standard Tcl code. 
  327.  
  328.     Interface Preferences etc.  The rest of this menu is used to set preferences.
  329.                             
  330.   Packages
  331.  
  332.     Miscellaneous Packages…     Set preferences for packages.
  333.     Describe A Package…         Show a description of a package.
  334.     Read Help For A Package…    Opens the documentation for a package.
  335.     Uninstall Some Packages…    Uninstall one or more packages.
  336.     Internet Updates->          To download packages from Internet.
  337.     Rebuild Package Indices     The Alpha's index of all installed 
  338.                                   packages.
  339.                             
  340.   Mode Prefs                    Set preferences for current mode.
  341.  
  342.     Menus and Features…         Change current mode's menus and features.
  343.     Preferences…                Change options for current mode.
  344.     Edit Prefs File             Edit mode-specific preferences.  Loaded 
  345.                                   after mode entered for the first time.
  346.     Load Prefs File               Load current mode's preferences.
  347.     Describe mode               Describe current mode's variable settings and 
  348.                                   bindings.
  349.     Change Mode…                Change the current mode.
  350.  
  351.   Set Font Tabs…                Change font and/or tabs for current file.
  352.   Special Keys…                 Set key bindings for electric features.
  353.   Describe Binding…             Wait for a keystroke, then display that
  354.                                   keystroke's binding. 
  355.   List Packages                 Create the "Packages" help file.
  356.   List All Bindings             List all current key bindings.
  357.   List Global Bindings (option) List all current global key bindings.
  358.   List Functions                List all functions currently defined, both
  359.                                   "core" functions (those coded in C), and
  360.                                   those coded in the supplied Tcl files.
  361.   View Saved Settings…          Any variables or flags that you modify during
  362.                                   the course of a session are saved to files
  363.                                   in the system preferences folder when
  364.                                   Alpha quits. This function shows all 
  365.                                   such saved variables.
  366.   Remove Saved Settings…        This function allows settings to be removed.
  367.  
  368.   Redefine Colors->             See the section below on "Coloring".
  369.             
  370.  
  371.                Windows (an icon with three windows)
  372.  
  373.  
  374.   Zoom                          Zoom windows in and out.
  375.   Default Size (option)         Resize window to default size.
  376.   Choose A Window               Choose window to select from list (proc 
  377.                                   chooseAWindow).
  378.   Iconify                       Toggle iconification of front window.
  379.   Arrange->                     Rearrange open windows.
  380.  
  381.   Split Window                  Split window into two panes, or unsplit.
  382.   Toggle Scrollbar              Toggle the horizontal scrollbar on the
  383.                                   frontmost window. 
  384.  
  385.     ----------------------------------------------------------------------
  386.  
  387.  
  388.           Basic editing
  389.  
  390.  
  391. The very basics for editing text with Alpha is the same as in any other 
  392. Mac application, but Alpha has a number of key shortcuts to speed up your 
  393. work, and a couple of features not found in similar applications.
  394. Emacs user will also be happy to know that many of the basic keybindings 
  395. used in Emacs are supported by Alpha. However, this requires that you 
  396. switch on the Emacs package. Read more in the file "Emacs Help".
  397.  
  398.  
  399. The following is a list of some of the most commonly used key bindings in
  400. Alpha's default setup, those that are generally not listed in any menus:
  401.  
  402.  
  403.                Help
  404.  
  405. 'help'                                    open the "Alpha Manual" help file
  406.  
  407. control-'help'                            open any available help for the mode
  408.                                           of the frontmost window.
  409.  
  410.                Moving the Cursor
  411.  
  412.  
  413. left-arrow           or  control-b      backward character
  414. right-arrow          or  control-f      forward character
  415.  
  416. command-left-arrow   or  control-a      beginning of line
  417. command-right-arrow  or  control-e      end of line
  418.  
  419. option-left-arrow    or  option-b       backward one word
  420. option-right-arrow   or  option-f       forward one word
  421.  
  422.  
  423. up-arrow             or  control-p      previous-line
  424. down-arrow           or  control-n      next-line
  425.  
  426. command-up-arrow     or  'home'         beginning of window
  427. command-down-arrow   or  'end'          end of window
  428.  
  429. option-up-arrow      or  'Page up'      move one page backward
  430. option-down-arrow    or  'Page down'    move one page forward
  431.  
  432. control-up-arrow                        scroll window up one line
  433. control-down-arrow                      scroll window down one line
  434.  
  435.  
  436.  
  437.                Selecting Text
  438.  
  439.  
  440. shift-left-arrow                extend selection one char left
  441. shift-right-arrow               extend selection one char right
  442.  
  443. shift-up-arrow                  extend selection one line up
  444. shift-down-arrow                extend selection one line down
  445.  
  446. shift-option-left-arrow         extend selection one word left
  447. shift-option-right-arrow        extend selection one word right
  448.  
  449. control-h                       select next word
  450.  
  451. shift-command-left-arrow        select to beginning of line
  452. shift-command-right-arrow       select to end of line
  453.  
  454.  
  455. command-B                       select smallest set of parentheses, braces, or 
  456. (Balance in Text menu)          brackets that encloses the current selection
  457.  
  458. double-clicking                 select a word
  459. triple-clicking                 select a line
  460.  
  461.  
  462. Control-double-clicking on any type of parentheses or bracket selects from 
  463. the parentheses or bracket to its mate. Without the control key held down, 
  464. only the intervening text is selected.
  465.  
  466.  
  467.                Deleting Text
  468.  
  469.  
  470. 'del'      or  control-d        delete forward char
  471. 'delete'                        delete backward char
  472. option-d                        delete forward word
  473. option-h   or  option-delete    delete backward word
  474. control-k                       delete to end of line
  475.  
  476.  
  477.                Twiddle, Shifting Text
  478.  
  479.  
  480. The following functions are found in the Text menu.
  481.  
  482. Twiddle (command-`)                  Exchange characters bracketing 
  483.                                      the selection point.
  484. Twiddle Words (command-option-`)     Exchange words bracketing the 
  485.                                      selection point.
  486.  
  487. Shift Left (command-[)               Shift selection left one tab.
  488. Shift Left Space (command-option-[)  Shift selection left one space.
  489. Shift Right (command-])              Shift selection right one tab.
  490. Shift Right Space (command-option-]) Shift selection right one space.
  491.  
  492.  
  493.                The Numeric Key Pad
  494.  
  495.  
  496. Alpha starts up with the Num Lock off so that the numeric key pad can be
  497. used as a navigation tool.
  498.  
  499. 0   Scroll back one page 
  500. 1   Jump to the start of the nearest function above the current position * 
  501. 2   No special function; types a "2" 
  502. 3   Jump to the start of the nearest function below the current position * 
  503. 4   Move to beginning of current word 
  504. 5   Marks current insertion point and moves cursor to previous mark. 
  505.  
  506.     Note: This is extremely useful for navigating across text chunks.  Try
  507.     'paste'-ing a large chunk of text, and then immediately hit Keypad 5.  
  508.  
  509.     Try 'put cursor at top/bottom of document' (Keypad 0 or .), and then
  510.     immediately hit Keypad 5.  After a few minutes, you won't be able to
  511.     live without Keypad 5...
  512.  
  513. 6   Move to end of current word 
  514. 7   Delete all characters from current insertion point to beginning of word 
  515. 8   Put cursor at top of document (new in 7.4.x) 
  516. 9   Delete all characters from current insertion point to end of word 
  517.  
  518. .   Put cursor at bottom of document 
  519. +   Cycles between the two topmost windows 
  520. -   Makes the previous window topmost 
  521.  
  522. shift-clear   Turns num lock off, allowing you to use the keypad for numbers
  523. clear         Move the current line to the top of the window
  524. enter         Page forward 
  525.  
  526. * Note: in modes where no function specifying pattern exist, 1 and 3 just
  527. look for parenthesis (e.g. text mode).  Also, in Tcl trace dumps these keys
  528. help follow Tcl calls and returned values (advanced stuff)
  529.  
  530. The =, /, * keys function normally.
  531.  
  532. To turn off these special navigation functions, turn on the Num Lock (using 
  533. shift-clear).
  534.  
  535. Turning the Num Lock off will recover the navigation features of the
  536. numeric key pad.
  537.  
  538.  
  539.                Drag and Drop editing
  540.  
  541.  
  542. Alpha supports drag and drop cut, copy, clear, and paste.  To use this
  543. feature, select some text, then move the cursor over the selected text. 
  544. The cursor should then turn into an open hand.  Mouse down, and move the
  545. cursor to the place you wish to paste the text.  When the mouse is
  546. released, the hilighted text is moved to the new location.
  547.  
  548. Option-mouse does a "copy" instead.  You can also drag selections between
  549. windows and to and from other applications, including the Finder.  Text
  550. dragged to the Finder is saved in a text clip file.  Text can be deleted by
  551. dragging it to the trash can.
  552.  
  553. You can also drag any text file to an Alpha window to insert the content of
  554. the file in the window.
  555.  
  556. You MUST have system 7.5 or above or Apple's "Macintosh Drag And Drop"
  557. extension installed.  Get a copy from Apple or via Alpha's web page.
  558.  
  559.  
  560.                Rectangular Editing
  561.  
  562.  
  563. If the option key is pressed while the mouse is dragged, a rectangular
  564. section of text is selected instead of the normal selection.  This
  565. rectangular selection may extend over multiple lines, but contains only
  566. text between the column of the drag start and the column of the drag end. 
  567. The drag cannot end on a column or row less than the start.  This selection
  568. can be extended by option-shift-mouse, but not dragged further.
  569.  
  570. The rectangular selection can be deleted, copied, and pasted.  This is very
  571. useful for tables and arrays, such as in LaTeX. Usually, the operation will
  572. be intuitive.  However, if you use proportional fonts the selection may
  573. appear ragged.  If some of the line contain tabs, the result may not be
  574. want you want.  Converting tabs to spaces in the desired region before
  575. attempting rectangular selection usually fixes the problems.
  576.  
  577.  
  578.                Fill Routines
  579.  
  580.  
  581. The 'fill' and 'wrap' routines reformat text to specified line lengths. 
  582. This is useful in two case.  First, word processors such as Microsoft Word
  583. only insert carriage returns at the end of paragraphs.  Secondly, while
  584. typing and inserting text into pre-existing paragraphs, the line lengths
  585. become unequal.
  586.  
  587. The 'wrap' routine handles word processor documents quickly by merely
  588. inserting carriage returns as necessary to ensure all lines in the selected
  589. region are shorter than specified by the preference 'Fill Column'.  Alpha
  590. asks the user if wrapping should be done whenever the user opens files that
  591. have lines longer than 'Para Column' characters.  This feature can be
  592. defeated by including the word 'nowrap' anywhere on the first line.
  593.  
  594. The 'fill' routine goes further.  Not only does it break lines, but it also
  595. coalesces lines to eliminate short lines.  The routine works by stripping
  596. the relevant text of white space, then re-inserting white space and
  597. carriage returns so that no line extends past 'Fill Column' characters in
  598. length and begins with 'Left Fill Column' spaces characters.
  599.  
  600. The preferences 'Fill Column', 'Para Column', and 'Left Fill Column' can
  601. all be set in the dialog "Config --> Preferences --> Text".
  602.  
  603. Both the fill and wrap routines come in two flavors, 'Fill/Wrap Paragraph'
  604. and 'Fill/Wrap Region'.
  605.  
  606.  
  607.                Fill Paragraph
  608.  
  609.  
  610. If there's a selection, then Alpha fills all paragraphs in that selection. 
  611. If not then Alpha fills the paragraph surrounding the insertion point.  The
  612. definition of a 'paragraph' may be mode dependent, but in Text mode it is
  613. the text between the closest empty lines.  Fill Paragraph also uses an
  614. extra preference 'Double Spaces', which determines if an extra space after
  615. should be placed after the '.'  at the end of each sentence.  This
  616. preference is set in the dialog "Config --> Preferences --> Text".
  617.  
  618.  
  619.                Fill Region
  620.  
  621.  
  622. If there's a selection, then Alpha fills all paragraphs in that selection. 
  623. If not then Alpha fills the region between the insertion point and the
  624. mark.
  625.  
  626.  
  627.                Wrap Paragraph
  628.  
  629.  
  630. Wrap the paragraph surrounding the insertion point.
  631.  
  632.  
  633.                Wrap Region
  634.  
  635.  
  636. If there's a selection, then wrap the selection.  If not then wrap the
  637. region between the insertion point and the mark.
  638.  
  639.  
  640.           Key bindings
  641.  
  642.  
  643. Many of Alpha's menu items are bound to specific keys.  In general, key
  644. binding information is given to the right of any menu command.
  645.  
  646. Alpha includes many key bindings that go beyond those found in most
  647. software applications.  Many of them are bound to specific menu items, and
  648. are displayed next to the item's name.  Modifier keys (for the Macintosh)
  649. include "command", "option", "control", and "shift".  As of this writing
  650. the option key is not available for AlphaTk, although "escape" can serve as
  651. a meta-key.
  652.  
  653. To quickly find out what a specific key is bound to, use the menu item
  654. "Config --> Describe Binding", and then press the key combination in
  655. question.  If you look closer at the "Config" menu, you'll also see that F7
  656. is bound to this menu item.  For example, type
  657.  
  658.     F7
  659.     <command>-S
  660.  
  661. and you'll see that command-S is bound to 
  662.  
  663.     menu::fileProc "File" "save" 
  664.  
  665. (command is the "Apple" key on the Macintosh, by the way, and "alt" on a PC)
  666.  
  667. Sometimes the information given by F7 will seem somewhat cryptic, because
  668. these are the actual Tcl commands, but in general it is easy to decipher
  669. what is going on.
  670.  
  671. If you take a look at the "File" menu, you'll see that "Save" also gives
  672. the key binding information -- if you find yourself using the same menu
  673. commands over and over again, learning a few of these bindings can save a
  674. lot of time and travel of the mouse.
  675.  
  676. The "Config --> List All Bindings" menu item will list all current key
  677. bindings, or you could just click here --> <<global::listAllBindings>>.
  678.  
  679. Alpha allows you to customize the keystrokes you use to invoke editor
  680. functions.  Any Tcl command (or accented characters) can be bound to any
  681. single keystroke.  See "Default Key Bindings" for more information.
  682.  
  683.  
  684.     ----------------------------------------------------------------------
  685.  
  686.  
  687.           International Users
  688.         
  689.  
  690. There is a basic problem international users will notice, which have to do 
  691. with the fact that the keyboard layouts are different in different countries. 
  692. Therefore some keybindings in Alpha may not work with all keyboards. For 
  693. example, on a Swiss keyboard, '/' is shift-7 (which means you have to press 
  694. shift to get '/'. This means there is no difference between cmd-/ and 
  695. shift-cmd-/ on such a keyboard. In Alpha these are bound separately to 
  696. 'zoom' and 'singlePage'.
  697.  
  698. If you're using a western keyboard Alpha can solve some of these problem
  699. for you.
  700.  
  701. First: Activate the "International Menus" feature. It replaces some
  702. keybindings in the menus and solves problems like the one just described.
  703. However, only key bindings in the global menus "File" to "Windows" are
  704. modified. Any other menu may still have problems.
  705.  
  706. Second: Tell Alpha which keyboard layout you're using in the preferences
  707. dialog "Config --> Preferences --> International".  (In a future version,
  708. Alpha should be able to get this information from the OS directly.)  This
  709. will make sure that some bindings not defined in the menus work, e.g. that
  710. the electric braces work.  However, problematic bindings defined in the
  711. various packages are usually not cured by this.
  712.  
  713.  
  714.                Which menu items are affected?
  715.  
  716.  
  717. The menu items that the International Menus package change are (depending 
  718. on which keyboard layout you use, some of these may remain unchanged):
  719.  
  720. Edit menu: Twiddle, Twiddle Words, Shift Left/Right, Shift Left/Right Space
  721. Search menu: Return to Bookmark, Goto Line, Mark Hilite
  722. Windows menu: Zoom, Default Size, Choose A Window
  723.  
  724.  
  725.                Teaching Alpha new keyboard layouts 
  726.  
  727.  
  728. If you're not using a western keyboard or if you do encounter any problems,
  729. reading the following section will help to clarify things and should help 
  730. you to fix the problem. This section requires that you first read the 
  731. section Changing Alpha's behavior. If you need help defining 
  732. a new keyboard layout, subscribe to the ALPHA-D mailing list and ask for help.
  733.  
  734. To solve the problem with bindings in the menus you can use the 
  735. command: menu::replaceWith. To solve the problem with the Swiss keyboard 
  736. described above you would add the following to your preferences file:
  737.    
  738.     menu::replaceWith winMenu [list "//<Szoom" "//<S<I<OsinglePage"] \
  739.         items "<S//zoom" "<S<O<U/=singlePage"
  740.  
  741. To define your keyboard layout, add a line like this to your preferences 
  742. file:
  743.  
  744.     set "keyboards(U.S.)" {
  745.      {§1234567890-=[];'\`,./}
  746.      {±!@#$%^&*()_+{}:"|~<>?}
  747.      <U/[
  748.      <U/]
  749.     }
  750.  
  751. The first two lines tell Alpha how to map using the 'shift' key. Shift maps 
  752. each item in the upper string into the corresponding item in the lower 
  753. string.
  754.  
  755. The third and forth lines defines the keybindings for the left and right 
  756. braces, in this example to shift-[ and shift-].
  757.  
  758. See the file "alphaDefinitions.tcl" for examples of keyboard layout 
  759. definitions.
  760.  
  761. If you define an array entry keyboards(my-country), then you can just 
  762. select that in the international prefs dialog, and Alpha will set the flags 
  763. correctly. You can then send that keyboard array entry to the ALPHA-D 
  764. mailing list for inclusion in a future version of Alpha.
  765.  
  766. If a package wishes to be told when the keyboard changes, it can do 
  767. that by registering with the 'removekeyboard' or 'keyboard' hooks like
  768. this:
  769.  
  770.     # tell me when we switch to a "Swiss German" keyboard
  771.     hook::register keyboard keys::swiss "Swiss German"
  772.     # tell me when we disable a keyboard
  773.     hook::register removekeyboard my_disable_proc
  774.     # tell me when we enable a keyboard
  775.     hook::register keyboard my_enable_proc
  776.  
  777. In this way a clever package could remove the need for restarting 
  778. Alpha by unbinding and then rebinding all necessary items.
  779.  
  780.  
  781.     ----------------------------------------------------------------------
  782.  
  783.  
  784.           Undo + Redo
  785.  
  786.  
  787. Alpha supports unlimited undo and redo.  This means that most changes can
  788. be undone, and then redone, at will.  Bear in mind that once you create new
  789. modifications, all changes that you have undone but not redone are lost. 
  790. Another point to bear in mind is that saving a buffer to disk flushes the
  791. undo buffer.
  792.  
  793.  
  794.           Text Wrapping
  795.  
  796.  
  797. Alpha can wrap the text as you type in three different ways.  How Alpha
  798. wraps the text can be set for each mode.  Presumably you want Alpha to wrap
  799. plain text files, like this one, but not to wrap programming code.  How the
  800. wrapping is done is indicated in the leftmost popup menu in the statusbar,
  801. where also the way of wrapping can be changed.  A change affects the
  802. current mode, not only the current window.  The three ways of wrapping are:
  803.  
  804.     None
  805.  
  806. No wrapping.
  807.  
  808.     Wrap
  809.  
  810. When you type beyond 'Fill Column' positions, Alpha inserts a line break to
  811. make you continue typing on the next line.
  812.  
  813.     Soft
  814.  
  815. Soft text wrapping is re-formatting the rest of the paragraph on-the-fly as
  816. text is inserted and deleted.  Soft-wrapping is enabled by selecting "Soft"
  817. in the wrap popup menu in the status bar.  The text to be wrapped is
  818. delimited by the current line and the last line in the current paragraph. 
  819. Wrapping occurs after insertions that result in the current line becoming
  820. longer than 'Wrap High' characters long (tabs counted as one character), or
  821. deletions where the length of the line (tabs likewise) becomes less than
  822. 'Wrap Low' characters long.  
  823.  
  824. The soft wrapping is not "true" soft wrapping like the one used by word
  825. processors.  Alpha rather reformats the paragraph and inserts line breaks
  826. at new positions on-the-fly.
  827.  
  828. The values for 'Fill Column', 'Wrap High', and 'Wrap Low' can be changed in
  829. the dialog "Config --> Preferences --> Text".
  830.  
  831.  
  832.           Indentation
  833.  
  834.  
  835. Alpha automatically indents the text for you to make it easier to read. 
  836. How the text is indented is mode dependent.  In programming modes Alpha
  837. will indent blocks of code, like e.g. an if-else statement in C / C++ /
  838. Java / JavaScript etc.
  839.  
  840. if (a == 5) {
  841.     b = 5;
  842. } else {
  843.     b = 17;
  844. }
  845.  
  846. How many positions the code is indented is determined by the preference
  847. 'Indentation Amount', set in the "Config --> Preferences --> Electrics"
  848. dialog.  By default the code is indented 4 positions for each level of
  849. indentation.
  850.  
  851. Whether the code will be indented by spaces or tabs is dependent on the tab
  852. size, which can be set in the "Config --> Preferences --> Appearance"
  853. dialog.  By default the tab size is 8.  Thus with the default setting
  854. clearly your code can't be indented using tabs alone.  'Odd' indents will
  855. require a number of tabs plus 4 spaces, and 'Even' indents will be ok with
  856. just tabs.
  857.  
  858. If you want the code to be indented with spaces only, activate the feature
  859. "Indent Using Spaces Only" in the "Config --> Preferences --> Interface"
  860. dialog .
  861.  
  862.           
  863.     ======================================================================
  864.  
  865.  
  866. This next section ...
  867.  
  868. deals with Alpha-specific behavior which may be unfamiliar to new users.
  869.  
  870.  
  871.           User interface details
  872.  
  873.  
  874. Alpha's interface has several non-standard features, which are described in
  875. this section.
  876.  
  877.  
  878.                Horizontal scrollbar 
  879.  
  880.  
  881. You can remove the horizontal scrollbar from Alpha's windows in order to
  882. give you more real estate.  You can later get the scrollbar back when you
  883. need it.  The menu item Toggle Scrollbar in the Window menu inserts/removes
  884. the horizontal scrollbar.  The default for subsequent windows is controlled
  885. via the preference 'Hor Scroll Bar' ("Config --> Preferences --> Window").
  886.  
  887.  
  888.                Dynamic menus
  889.  
  890.  
  891. Alpha uses dynamic menus.  This means that some menu items are changed if
  892. you hold down any of the modifier keys.  Usually the option key is the one
  893. which reveals the hidden menu items, but there are also a few items which
  894. are revealed by holding down the control or shift keys.  Try this out by
  895. pulling down the File menu and holding down one of the option, control, or
  896. shift keys.
  897.  
  898.  
  899.                Tear-off menus
  900.  
  901.  
  902. Alpha's menus can be torn off from the menubar to make floating palettes of
  903. them.  Clicking on the buttons on the palettes performs the same action as
  904. the corresponding menu item.  Note that dynamic menu items are separated
  905. into several buttons, one for each dynamic item.
  906.  
  907. If the torn off menu has submenus, there will be popup submenus on the
  908. palette.  The submenus can in turn be torn off from the palette (as well as
  909. directly from the menu in the menubar).
  910.  
  911. If a torn off menu belong to a specific mode, the palette will disappear /
  912. reappear whenever you change from/to that mode.
  913.  
  914. If you do not want to use tear-off menus, you can disable this feature by
  915. unchecking 'Tearoff Menus' in the "Config --> Preferences --> Appearance"
  916. dialog.
  917.  
  918.     Bugs: 
  919.  
  920. Buttons in the palettes are not disabled when the corresponding menu items
  921. are.
  922.  
  923. Torn off submenus belonging to a specific mode are not hidden when you
  924. change from that mode, only the main menu.
  925.  
  926.  
  927.                Status bar
  928.  
  929.  
  930. The stripe across the bottom of the screen is a floating window which is
  931. used to display short messages.  This window is called the status bar. 
  932. Some functions also uses it to prompt for input of some text.
  933.  
  934. To the right of the status bar there are three menus.
  935.  
  936. • Wrap menu.  Shows if the lines in the current window are wrapped
  937. automatically and if the wrapping is soft or not.  See the Section Text
  938. Wrapping for more information about text wrapping.
  939.  
  940. • File Attributes menu.  Shows various attributes of the current window
  941. that can be changed.  What "Mac", "Unix", "IBM", "MPW", "Think", and "None"
  942. means are explained in the Section File formats.
  943.  
  944. Read only lets you toggle if the current window can be edited or not.  Show
  945. invisibles toggles if invisible characters are shown or not.  This affects
  946. all windows, not only the current one.
  947.  
  948. Tab size opens a dialog which lets you set the tab size of the current
  949. window, i.e. how many positions a tab uses.
  950.  
  951. • Mode menu.  Shows the current mode and allows it to be changed.
  952.  
  953. Finally, to the very right of the status bar the current line and column
  954. are displayed.  Clicking opens a dialog that allows a specific line to be
  955. found.
  956.  
  957. You can't make the status bar go away.  However, it can be dragged if you
  958. uncheck 'Lock Status' in the dialog "Config --> Preferences --> Window".
  959.  
  960.  
  961.                Funcs menu
  962.  
  963.  
  964. Above the vertical scrollbar on the right is an icon with curly braces
  965. ('{}').  This is the so called "Funcs" menu.  The content of this menu is
  966. mode dependent, but for modes for programming languages it usually lists
  967. function definitions of the the current window.  Select a function in the
  968. menu to jump to its definition in the window.  Refer the mode specific help
  969. files for details about the Funcs menu for a specific mode.  The menu is
  970. built when you press the braces, so it is always up-to-date. 
  971.  
  972. By default, the content in this menu is sorted alphanumerically.  This
  973. feature can be turned off via the preference 'Sort Funcs Menu' in the
  974. dialog "Config --> Preferences --> Appearance", making the menu appear
  975. faster on slower machines.
  976.  
  977. Power user tip: cmd-opt-K will put up a listpick dialog of the content of
  978. the '{}' menu.  As this is usually alphabetical you can type the starting
  979. letters of the index you want to go to.
  980.  
  981.  
  982.                Marks menu
  983.  
  984.  
  985. Below the funcs menu is the "Marks" menu, which pops up over the icon with
  986. the large 'M'.  The "Marks" menu lists all marks for the current window,
  987. and allows them to be cleared or automatically created.  Marks are a kind
  988. bookmarks in a file and helps you navigate it.  The marks are saved when
  989. you save the file.  Select an item in this menu to jump to the
  990. corresponding mark in the window.  Selecting 'Mark file' will generate
  991. marks for the current window.  Which marks are generated is mode dependent. 
  992. Refer to the mode specific help files for information about which marks are
  993. generated in a specific mode.  For an extended discussion about marks, see
  994. the section 'Marks'.
  995.  
  996. Tip: ctrl-cmd-K will put up a listpick dialog with the current marks of the
  997. file.
  998.  
  999.  
  1000.                Icons 
  1001.  
  1002.  
  1003. Above the Funcs menu is either nothing, a red disk icon, or a lock icon. 
  1004. The red disk icon indicates that the window is unsaved; clicking on the
  1005. icon saves the window.  The lock icon indicates that the window is
  1006. read-only; command-clicking toggles the lock icon.  Note, however, that an
  1007. unsaved window cannot be made read-only.
  1008.  
  1009.  
  1010.                Title bar
  1011.  
  1012.  
  1013. Clicking on the window title pulls down a popup menu showing all containing
  1014. folders of the window's file.  Selecting an item in this menu puts up a
  1015. open dialog in the selected folder.  Selecting an item in the menu while
  1016. holding down the shift key opens the folder in the Finder instead of
  1017. putting up a file dialog.
  1018.  
  1019. Command-clicking on the title bar anywhere but right on the title pulls
  1020. downs the Mark menu.  This is also the case you click on the edges of the
  1021. window.
  1022.  
  1023. Tip: Using the sides of the window lets you access a particular area of the
  1024. menu quicker as you can cmd-click in the approximate location of the menu
  1025. item you want to select.
  1026.   
  1027. Option-clicking on the title bar brings down a menu.  The content of this
  1028. menu is mode dependent, but not all modes will define the content of the
  1029. menu.  If that is the case, the menu will contain a list of all files and
  1030. folders in the open window's folder.  Selecting a file in the menu will
  1031. open it.  Selecting a folder will open the containing folder in the Finder. 
  1032. Note that for windows not saved to the disk there will be no menu with
  1033. files.  Even if the mode will create a menu when option-clicking the title
  1034. bar, all files and folders in the window's folder may be added to the menu. 
  1035. This happens if the number of items in the menu created by the mode is less
  1036. than what is specified by the preference 'Min Items In Title Popup' which
  1037. you find in the dialog "Config --> Preferences --> Window".
  1038.  
  1039.  
  1040.                Split-pane bar
  1041.  
  1042.  
  1043. Above the vertical scrollbar, right under the Marks menu ('M') is a black
  1044. "split-pane" bar.  Double-clicking or dragging the split-pane bar splits
  1045. the frontmost window into two separately scrollable panes.  You can also
  1046. use the menu item 'Split Window' in the Window menu.  Either pane can be
  1047. edited, any changes appear in both panes if they show the same text.  Move
  1048. from one pane to the other by clicking in the pane or by typing control-x,
  1049. then 'o'.  Go back to a single pane by either double-clicking again or
  1050. dragging the bar back to the top of the window.
  1051.  
  1052.  
  1053.                Iconified windows
  1054.  
  1055.  
  1056. Alpha can create small icons of the windows, which are ordered along the
  1057. right edge of your screen.  'Iconify' (ctrl-I) in the window menu creates
  1058. an icon of the frontmost window.  If all windows are iconified it expands
  1059. one of the windows again.
  1060.  
  1061. Checking 'Iconify On Switch' in the "Config --> Preferences --> Window"
  1062. dialog will make Alpha do the following:
  1063.  
  1064. • Iconify all open windows when you switch to another app.
  1065. • Expand all windows, which were not iconified before switching from Alpha, 
  1066.   when switching back to Alpha.
  1067.  
  1068.  
  1069.     ----------------------------------------------------------------------
  1070.  
  1071.  
  1072.           Tiling windows
  1073.  
  1074.  
  1075. Alpha provides many different ways to move windows around the screen, most 
  1076. of which are accessible via the windows menu, i.e the menu with the window 
  1077. icons. The first four items of the "Windows --> Arrange" menu move windows 
  1078. around a virtual box on the screen, defined by the preferences found in the 
  1079. dialog "Config --> Preferences --> Tiling".
  1080.  
  1081.  
  1082.                Vertically
  1083.  
  1084.  
  1085. Tiles 'Num Wins To Tile' number of windows vertically. Preferences which 
  1086. affects the tiling:
  1087. 'Tile Top' The position of the upper edge of the top window.
  1088. 'Def Width' The width of the windows. (Def Width is set in the Windows 
  1089. preferences dialog.)
  1090. 'Tile Margin' Controls the gap between the windows.
  1091. 'Tile Height' Determines the height of the windows by the formula
  1092.          (Tile Height + (Tile Margin -1))
  1093. height = ________________________________
  1094.                 Num Wins To Tile
  1095.  
  1096.  
  1097.                Horizontally
  1098.  
  1099.  
  1100. Tiles 'Num Wins To Tile' number of windows horizontally. Preferences which 
  1101. affects the tiling:
  1102. 'Tile Height' The height of the windows.
  1103. 'Tile Left' The position of the left edge of the left window.
  1104. 'Hor Margin' Controls the gap between the windows.
  1105. 'Tile Width' Determines the width of the windows by the formula
  1106.          (Tile Width + (Hor Margin -1))
  1107. width = ________________________________
  1108.                 Num Wins To Tile
  1109.  
  1110.  
  1111.                Unequal Vert and Unequal Hor
  1112.  
  1113.  
  1114. Tile two window by splitting the space between them, with the proportion 
  1115. assigned to the first controlled by 'Tile Proportion'.
  1116.  
  1117.  
  1118.     ----------------------------------------------------------------------
  1119.  
  1120.  
  1121.           File formats
  1122.         
  1123.  
  1124. Alpha can read and write files stored in different formats.  In the dialog
  1125. for the menu item 'Save As…' you can specify in which format a file should
  1126. be written through the popup menus State and Format.
  1127.  
  1128.  
  1129.                State popup menu
  1130.  
  1131.  
  1132. 'State' allows you to specify how much extra information should be saved in 
  1133. files that you use.
  1134.  
  1135. MPW     Window position, current selection, tab sizes, and font 
  1136.         information are saved every time you open and close the file.
  1137. Think   Tab sizes, and font information are saved every time you open 
  1138.         and close the file.
  1139. None    No information is saved when you open and close the file.
  1140.  
  1141. The state information is saved in the file's resource fork. It is saved 
  1142. even if you don't modify the file. Saving this information does not change 
  1143. the modification date of the file.
  1144.  
  1145. Note that if a given file already has mpw information in it when the file 
  1146. is open, Alpha will always update that information when the file is closed. 
  1147. Note also that marks are always saved in the resource fork whenever a 
  1148. file is saved, regardless of the 'State'.
  1149.  
  1150.  
  1151.                Format popup menu
  1152.  
  1153.  
  1154. This menu specifies the way Alpha terminates lines.  This to make it easier
  1155. to share files with other platforms as lines are terminated differently on
  1156. different platforms.
  1157.  
  1158. Mac     Lines end with a carriage return.
  1159. Unix    Lines end with linefeed.
  1160. IBM     Lines end with both carriage return and linefeed. 
  1161.             Typical, isn't it?          
  1162.  
  1163. Alpha will transparently read and write all three of these formats.  If you
  1164. are not sharing files with other platforms you don't have to worry about
  1165. the format and simply you the default Mac format.  Note that if you are
  1166. going to be sharing files with a Unix or IBM machine, you probably don't
  1167. want anything in the resource fork, so you'd probably want to set 'State'
  1168. to 'None'.
  1169.  
  1170. Both the state and format for a file can be change through the File
  1171. attributes popup menu in the status bar.
  1172.  
  1173. In the dialog "Config --> Preferences --> Window" the default Saved State
  1174. can be changed.
  1175.  
  1176.  
  1177.     ----------------------------------------------------------------------
  1178.  
  1179.  
  1180.                Open file dialog
  1181.  
  1182.  
  1183. Alpha's open file dialog looks like the dialog in any other Mac application
  1184. except for three extra checkboxes at the bottom.
  1185.  
  1186.     Read only ...
  1187.  
  1188. Opens the file as read only.  That a file is read-only file is indicated by
  1189. a lock icon in the upper right corner of the window.  Read-only status can
  1190. be toggled by command-clicking on the icon.  The default action for 'space'
  1191. and 'backspace' when a file is read-only is to page forward (closing at the
  1192. bottom of the file) or backward.
  1193.  
  1194.     Projector Aware Projector ...
  1195.  
  1196. is freeware version control software from Apple that is included in MPW. It
  1197. also runs as a standalone application known as SourceServer.  It relies on
  1198. the existence of a 'ckid' resource in the files.
  1199.  
  1200. "Projector aware" means that an application
  1201.                 
  1202.         must   
  1203.  
  1204.             not remove this ckid resource if one exists (that means if an 
  1205.             application saves a file by writing a new one, then delete the 
  1206.             old and rename the new one it must also make sure to copy over 
  1207.             an existing ckid-resource even if it uses just the data fork)
  1208.  
  1209.         should  
  1210.  
  1211.             interpret this 'ckid' resource correctly to treat a file as 
  1212.             read-only if the ckid resource says that the file is read-only 
  1213.             and not only if the Finder locked flag is set.
  1214.  
  1215. However, I don't know how Alpha behaves in these two points.
  1216.  
  1217. Finally, a ckid resource can contain a third state between writable and
  1218. read-only.  This state is called  MRO (modify read only).  
  1219. Being a strange term (IMHO) MRO means that a file has been modified locally
  1220. but has not been checked out from the version control pool before.
  1221.  
  1222.     All files ...  
  1223.  
  1224. Allows Alpha to open any file rather than just text files.  (Technically
  1225. speaking: not only those with file type 'TEXT'.)
  1226.  
  1227.  
  1228.                Paragraph format
  1229.  
  1230.  
  1231. Word processors such as Microsoft Word and MacWrite only put carriage
  1232. returns at the end of paragraphs, so that they can wrap the paragraphs on
  1233. the fly.  This is what is referred to as 'paragraph format'.  Alpha does
  1234. not transparently convert to and from this format because there are valid
  1235. reasons why someone might want to edit a paragraph formatted file while not
  1236. in paragraph mode.
  1237.  
  1238. Therefore, when Alpha opens a paragraph-mode file, it asks the user whether
  1239. or not to remap it.  Alpha assumes a file to be in paragraph mode if it
  1240. contains any line longer than the value of 'Para Column', which can be set
  1241. in the dialog "Config --> Preferences --> Text".  Files can be mapped back
  1242. to paragraph mode by using 'Paragraph to Line' in the text menu.
  1243.  
  1244.  
  1245.     ----------------------------------------------------------------------
  1246.  
  1247.  
  1248.           Helper Applications
  1249.  
  1250.  
  1251. Alpha uses many helper application, e.g. a web browser and an ftp client. 
  1252. Using by the menu item "Config --> Preferences --> Helper Applications". 
  1253. you can choose which helpers to use or change.
  1254.  
  1255. Now, in some cases a dialog is opened with a popup menu with some popular
  1256. apps of the appropriate type.  Either choose one from the popup menu, or
  1257. select 'Locate manually' and click OK to locate the app on your disk.
  1258.  
  1259. In some cases a file dialog is directly opened to let you locate the helper
  1260. app.
  1261.  
  1262.  
  1263.           Spell Checking
  1264.  
  1265.  
  1266. Alpha has the capability to interact with the spell-checker 'Excalibur',
  1267. written by Robert Gottshall and Rick Zaccone.  The menu item 'Spellcheck
  1268. Window' is always available in the "Text" menu.  Selecting this item will
  1269. start up Excalibur and open the current window in Excalibur.  For version
  1270. 1.4 and earlier, if Alpha has to launch Excalibur you will need to dismiss
  1271. Excalibur's opening dialog by hitting the Cancel button.  Subsequent
  1272. selections of the menu item will switch right into Excalibur with the
  1273. correct file displayed.
  1274.  
  1275. When switching back from Excalibur to Alpha, Alpha reads the corrected
  1276. version of the file into the current window.
  1277.  
  1278. There is also a menu item 'Spellcheck Selection'.  This copies the current
  1279. selection to the clipboard and switches to Excalibur.  You can then use
  1280. 'Open Clipboard' in Excalibur's File menu to spellcheck the selection. 
  1281. When you switch back to Alpha you have to paste the corrected text
  1282. yourself.
  1283.  
  1284. Excalibur can be obtained from 
  1285.  
  1286.     <http://www.eg.bucknell.edu/~excalibr/excalibur.html>
  1287.  
  1288.  
  1289.           Command-clicking
  1290.  
  1291.  
  1292. Command-clicking on any text causes Alpha to try find a URL anywhere near
  1293. where you click.  If Alpha finds one it sends it to Internet Config which
  1294. passes it to the right helper application.  For example, place the mouse 
  1295. over this text and command-click:
  1296.  
  1297.     http://www.alpha.olm.net/
  1298.  
  1299. Unfortunately, this feature is rather buggy.  Whenever there is a colon
  1300. nearby where you click Alpha usually thinks there is a URL, although there
  1301. is not, and sends it to Internet Config.  If Internet Config returns an
  1302. error Alpha then interprets your command-click as a command-double-click
  1303. instead.
  1304.  
  1305.  
  1306.           Command-double-clicking
  1307.  
  1308.  
  1309. Command-double-clicking on a word activates a mode specific function which
  1310. uses the word you clicked on as input. In several programming modes, Alpha
  1311. tries to find the definition of the word you clicked on. Some examples:
  1312.  
  1313. When command-double clicking on a word in a C++ file Alpha first checks if
  1314. you clicked on an #include statement. Alpha then tries to open the file.
  1315. Next Alpha tries to look up the word in the tag file. If the word is not a
  1316. tag, or no tags have been specified, Alpha attempts to lookup the word
  1317. through the THINK Reference app. If you would like Apple's Toolbox
  1318. Assistant to be used instead, edit the proc: C++::DblClick.
  1319.  
  1320. In Tcl mode, if you click on a variable Alpha displays its value, if you
  1321. click on a command Alpha tries to look it up first in the Tcl folders, then
  1322. in "Alpha Commands", and then finally in "Tcl Commands".
  1323.  
  1324.           Search and Replace
  1325.         
  1326.  
  1327. Alpha has a full repertoire of searching commands.  The 'Find' menu item in
  1328. the Search menu brings up a dialog allowing the search and replacement text
  1329. to be specified.  Alpha can search either the current open window or a set
  1330. of files.
  1331.  
  1332. The dialog also allows the following options:
  1333.  
  1334.     Forward         
  1335.  
  1336. To search the text forwards or backwards.  This does not apply when
  1337. multiple files are searched.
  1338.  
  1339.     Ignore Case     
  1340.  
  1341. Whether the search should match case or not.
  1342.  
  1343.     Word Match      
  1344.  
  1345. Whether the search should match only complete words or not.
  1346.  
  1347.     Batch           
  1348.  
  1349. When making a batch search, a list of all matches in the fileset or current
  1350. window are displayed in a new browser window.  A particular match can be
  1351. displayed by moving the cursor to a line in the file of matches and hitting
  1352. "return".
  1353.  
  1354.     Grep            
  1355.  
  1356. The search and replace text strings are interpreted as regular expression. 
  1357. The word 'grep' comes from the unix command with the same name.
  1358.  
  1359.     Mult Files      
  1360.  
  1361. To search through all files in a given file set.  Checking the 'Mult Files'
  1362. box brings up a new popup menu.  In this menu you can choose which fileset
  1363. to search.  You can either select an existing fileset in the menu or create
  1364. a new one by selecting "New Fileset…".  Read more about fileset in the file
  1365. "Filesets Help".  In addition to the current filesets, the menu has an item
  1366. called 'Directory Scan'.  This allows you to specify a folder that will be
  1367. searched.  This folder is also saved at the end of the menu for future
  1368. searches.
  1369.  
  1370. And finally, Alpha allows a library of useful search and replace texts to
  1371. be defined.  This library is used and edited in the popup menu 'Patterns'. 
  1372. Selecting a pattern from the menu inserts the search and replace strings in
  1373. the dialog.  In addition
  1374.  
  1375. 'Remember Pattern' creates a new item in the menu from the current search
  1376. and replace strings.
  1377.  
  1378. 'Delete Pattern' lets you delete a pattern from the menu.
  1379.  
  1380. The global "Filters" menu allows for even more complicated search and
  1381. replace functions.  See the "Filters Help" file for more information.
  1382.  
  1383.  
  1384.                Incremental Searches
  1385.  
  1386.  
  1387. Emacs users will be happy that both forward and backward incremental
  1388. searches are implemented.  Incremental searches bypass the normal search
  1389. dialog and search for the current text after each keystroke.  The result is
  1390. often much faster and less intrusive.  The menu items 'Quick Find' and
  1391. 'Reverse Quick Find' in the Search menu are the forward and backward
  1392. incremental searches respectively.  
  1393.  
  1394. Start the search either from the menu or by typing ctrl-s or ctrl-r, then
  1395. type the word you are searching for.  After each letter you've typed Alpha
  1396. jumps to the nearest point in the text matching what you have typed so far. 
  1397. The search string is also displayed in the status bar.
  1398.  
  1399. Typing ctrl-s or ctrl-r again while an incremental search is in progress
  1400. causes the search to proceed to the next instance of the current text. 
  1401. Typing control-w while incremental search is active causes all the
  1402. characters to the end of the next word boundary to be added to the search.
  1403.  
  1404. Pressing the "Delete" key, or clicking on the window with the mouse will 
  1405. remove the most recent keystroke from the search pattern, and back up the 
  1406. search to the most recent find, acting as an internal "Undo" command while 
  1407. searching incrementally.
  1408.  
  1409. To escape or stop a search, press "Return", any of the arrow navigation 
  1410. keys, or the "Page Up/Down/etc" document navigation keys.
  1411.  
  1412.  
  1413.     ----------------------------------------------------------------------
  1414.  
  1415.  
  1416.           Browser Window
  1417.  
  1418.  
  1419. Browser windows are used to list the result of batch searches, as well as 
  1420. other similar lists. Each line in the browser window refer to a certain 
  1421. line in a file, in the case of batch searches the lines where what you 
  1422. searched for have been found. Navigate the windows using the up and down 
  1423. arrows, and jump to the match - i.e. the line in the file referred to by 
  1424. the line in the browser window - by hitting 'return'.
  1425.  
  1426. The browser windows are actually in a special mode, the browser mode. The 
  1427. complete set of keybindings in this mode is:
  1428.  
  1429. uparrow             move up one line in the window and select the line
  1430. ctrl-p                                      -"-
  1431. delete                                      -"-
  1432. downarrow           move down one line in the window and select the line
  1433. ctrl-n                                      -"-
  1434. space                                       -"-
  1435. return              go to match
  1436. enter                   -"-
  1437. ctrl-C ctrl-C           -"-
  1438.  
  1439. In the Search menu there is also a very useful command 'Next Match'. 
  1440. Regardless which window is frontmost, it brings the browser window to the 
  1441. front, navigate down one line, and goes to the match of that line. Thus, 
  1442. this gives you a quick way to jump to all matches without having to 
  1443. manually bring the browser window to the front.
  1444.  
  1445.  
  1446.           
  1447.     ======================================================================
  1448.  
  1449.  
  1450. This next section deals with ...
  1451.  
  1452.  
  1453. "Modes" and "Packages" contained in the AlphaTcl library.
  1454.  
  1455.  
  1456.           Modes
  1457.  
  1458.  
  1459. Alpha is made for editing text of many different kinds.  Therefore Alpha
  1460. can switch between many different modes.  When Alpha switch between the
  1461. modes some of Alpha's functionality changes to better help you to write the
  1462. particular kind of text you are editing.  For example C++ mode is used to
  1463. edit code in the C++ programming language, and HTML mode is used for
  1464. editing web pages.  Alpha comes with more than 25 modes, most of them being
  1465. modes for different programming languages.  The default mode is called Text
  1466. mode and is used for editing plain text, like this manual for example. 
  1467. Alpha also switches to Text mode when you open a new untitled window.  See
  1468. the file "Packages" for a complete list of them and for links for help for
  1469. each of them.  This section is only a general discussion about modes.
  1470.  
  1471. Simple examples of functionality which changes between the modes are:
  1472.  
  1473. • Coloring of the text.  Programming language all have special keywords. 
  1474. Alpha colors these keywords to make the code easier to read, and these
  1475. words are naturally different in different programming languages.
  1476.  
  1477. • Alpha indents the code to make it easier to read.  This is also naturally
  1478. done differently for different programming languages.
  1479.  
  1480. Most modes also add functionality to Alpha, functionality which is not
  1481. available for the basic Text mode.  Some modes also have there own menu(s)
  1482. which are inserted in the menu bar when switches to the mode in question. 
  1483. This menu(s) are removed again when Alpha leaves the mode.  Some simple
  1484. examples of extra functionality in different modes:
  1485.  
  1486. • In C++ mode Alpha can help you to quickly type certain language
  1487. constructs, such as for loops.
  1488.  
  1489. • In HTML mode there is a function to create a link between two web pages.
  1490.  
  1491. It is important to know that Alpha has both global menus and functionality,
  1492. which are always there regardless of the mode, and mode specific menus and
  1493. functionality, which are only there when Alpha is in a specific mode.  For
  1494. instance, the menus from File to Config and the Window menu (the one with
  1495. the three windows icon) are global menus.
  1496.  
  1497. When you open a file Alpha always chooses a mode for it.  Alpha does its
  1498. best to choose the mode you want.  Therefore it is important to know how
  1499. Alpha chooses the mode.  The following is considered:
  1500.  
  1501. • The suffix in the file name.  For example, 'file.c' is opened in C++ mode
  1502. because of the '.c' suffix, 'file.html' is opened in HTML mode because of
  1503. the '.html' suffix.  You can view and edit the suffix mapping using the
  1504. menu item "Config --> Preferences --> Suffix Mappings…" In this dialog the
  1505. suffices for each mode is specified as a list of patterns matching the file
  1506. names.  In these patterns * stands for 'any characters', e.g. the pattern
  1507. '*.c' matches any file name ending by '.c'.  As an example, for Perl mode
  1508. the default patterns are: *.pl *.ph *.pm meaning that any file with a name
  1509. ending by '.pl', '.ph', or '.pm' will be opened in Perl mode.
  1510.  
  1511. • If the first non-empty line contains a string '-*-Mode: <mode>-*-' or
  1512. '-*-<mode>-*-' (without quotes) then Alpha switches to the mode <mode>. 
  1513. For example, if the first non-empty line contains '-*-HTML-*-' Alpha opens
  1514. this file in HTML mode.
  1515.  
  1516. • If the first non-empty line reads "#!/dir/subdir/command ..."  then Alpha
  1517. tries to find a mode corresponding to 'command'.  This kind of line is used
  1518. in unix files.
  1519.  
  1520. • In some cases Alpha can choose the mode depending on which application
  1521. has created the file.  One example is that files created by MacPerl are
  1522. opened in Perl mode.
  1523.  
  1524. You can customize which modes Alpha chooses in the last two cases, see the
  1525. Sections modeCreator and unixMode.
  1526.  
  1527. You can also manually change mode for a window by selecting one in the mode
  1528. popup menu in the status bar.  The mode menu is the rightmost of the three
  1529. menus in the status bar.  You can also change mode using the menu item
  1530. "Config --> Mode Prefs --> Change Mode…"
  1531.  
  1532. Once Alpha has chosen a mode for a window, Alpha remembers it when you
  1533. switch between the windows, until you manually change the mode for the
  1534. window.
  1535.  
  1536. Tip: Holding down the shift key while selecting a mode in the mode popup
  1537. menu makes Alpha open the help file for the mode instead of changing mode
  1538. for the window.  Holding down the option key while selecting a mode in the
  1539. mode popup menu makes Alpha give you a description of the mode.  However,
  1540. most of this description is hardly of any use unless you know Tcl
  1541. programming.
  1542.  
  1543.  
  1544.           Alpha's Preferences
  1545.  
  1546.  
  1547. Alpha stores most preferences in the "defs.tcl" and "arrdefs.tcl" files in
  1548. your preferences folder.  The preferences folder is in the standard system
  1549. preferences folder, and is named 'Alpha' (for versions < 7.0) or Alpha-v7
  1550. for version 7 (and will be called Alpha-v8 when version 8.0 is released at
  1551. some point in the future...)
  1552.  
  1553. If you are upgrading to Alpha 7.x from 6.x, some of your old preferences
  1554. will be incompatible/irrelevant to the new Alpha version.  Therefore you
  1555. shouldn't just copy the two prefs files from one folder to the other.
  1556.  
  1557. Here's how to copy over just a few preferences: open the old 'defs.tcl' or
  1558. 'arrdefs.tcl' and examine them for lines you wish to copy.  Open the new
  1559. 'defs.tcl' and 'arrdefs.tcl'.  Alpha opens them in read-only mode, but you
  1560. can command-click on the 'lock' icon in the window to make the windows
  1561. modifiable.  Now copy and paste as you desire.  Finally save the windows
  1562. and quit and restart Alpha.  If you get an error on startup, you probably
  1563. copied over incompatible preferences and you'll have to delete the files
  1564. and start over (hence it may be a good idea to make a backup copy of the
  1565. originals before you start).
  1566.  
  1567. Note: if you don't wish to use a System-Folder prefs folder, create a
  1568. folder called 'AlphaPrefs' next to the Alpha application.  Alpha will use
  1569. that folder preferentially if it exists.
  1570.  
  1571.  
  1572.                Global and mode preferences
  1573.  
  1574.  
  1575. Alpha has two types or preferences, global and mode preferences. 
  1576.  
  1577. • Global preferences always apply regardless of the mode. These are set in 
  1578. the various dialogs "Config --> Preferences".
  1579.  
  1580. • Mode preferences only apply to windows in that mode, and are set in the 
  1581. dialog "Config --> Mode Prefs --> Preferences…". Some modes may also have other 
  1582. means of setting preferences. Note that in some cases there are mode 
  1583. preferences which coincide with a global preference. In this case the mode 
  1584. preference override the global one.
  1585.  
  1586. The is also another way of customizing Alpha than setting preferences in 
  1587. these dialogs. That is using preferences files where you add your own Tcl 
  1588. code. There is both a global preferences file, opened using 
  1589. "Config --> Preferences --> Edit Prefs File" and a mode specific one opened using 
  1590. "Config --> Mode Prefs --> Edit Prefs File".
  1591.  
  1592. To learn about writing your own code for Alpha, see the section Changing 
  1593. Alpha's behavior.
  1594.  
  1595.  
  1596.                Coloring
  1597.         
  1598.  
  1599. Alpha supports automatic coloring of the text. The way Alpha colors the 
  1600. text depends on the current mode. There are basically three different 
  1601. things Alpha can color.
  1602.  
  1603. Keywords    A set of words with a special meaning, e.g. keywords in 
  1604.             programming languages.
  1605. Strings     Text delimited by double quotes. Alpha can color single-line 
  1606.             strings only.
  1607. Comments    Comments in programming code.
  1608.  
  1609. For details about the coloring in a specific mode, see the help file for 
  1610. the mode. The coloring support in the different modes differ and some 
  1611. modes have a more complex coloring support than just the basic things 
  1612. mentioned above.
  1613.  
  1614. Colors for keywords, strings, and comments (for applicable modes) can all 
  1615. be changed via the "Config --> Mode Prefs --> Preferences…" menu item. Some 
  1616. modes may offer more extensive customization.
  1617.  
  1618. By default there are seven different colors to choose between, blue, cyan, 
  1619. green, magenta, red, white, and yellow. If you wish you can redefine these 
  1620. via the menu "Config --> Redefine Colors". For instance, you can redefine 'red', 
  1621. and any text that is currently red will then be the new color you specify. 
  1622. In addition, there are eight other colors 'Color_9' through 'Color_15' 
  1623. which you can use to define your own colors. Note that by default these 
  1624. colors do not show up in the mode preferences dialog because until you have 
  1625. given them a value they are undefined.
  1626.  
  1627. Coloring can be turned off completely by unchecking 'Coloring' in the 
  1628. dialog "Config --> Preferences --> Appearance".
  1629.  
  1630. Additionally, Alpha allows the text color and window background to be 
  1631. changed. These are changed by redefining 'Foreground' and 'Background' in 
  1632. the "Config --> Redefine Colors" menu.
  1633.  
  1634.  
  1635.                Advanced coloring customization 
  1636.  
  1637.  
  1638. If you don't find the customization in the mode preferences dialog
  1639. sufficient, you can customize the coloring by adding some Tcl code to the
  1640. mode preferences file.  This file is opened (or created, if necessary) via
  1641. the "Config --> Mode Prefs --> Edit Prefs File" menu item.  Coloring is
  1642. defined using the command: regModeKeywords.  See the file "Alpha Commands"
  1643. for a complete description on how to use this command.
  1644.  
  1645. As an example the line:
  1646.  
  1647.     regModeKeywords -a -k blue Fort {blah bladdity}
  1648.     
  1649. will add the keywords 'blah' and 'bladdity' colored blue in Fortran mode.
  1650.  
  1651.  
  1652.     ----------------------------------------------------------------------
  1653.  
  1654.  
  1655.           Packages
  1656.  
  1657.  
  1658. Alpha has a very flexible mechanism for adding extra functionality.  Much
  1659. of Alpha's functionality has been bundled into a number of so called
  1660. packages.  This has two main advantages.  First, the user can choose to
  1661. activate only those packages he or she wants and totally ignore the other
  1662. ones.  Second, anybody can write and distribute new packages for Alpha.
  1663.  
  1664. Alpha comes with a large number of packages.  The remainder of this section
  1665. describes some of them, but you can also see the file "Packages" for a
  1666. complete list which includes links for package specific help files.
  1667.  
  1668. The menu item "Config --> Packages --> Read Help For A Package…" will also
  1669. give information about specific packages.  To learn how to install new
  1670. packages see the section below on 'Installing New Packages'.
  1671.  
  1672. The packages come in three flavors:
  1673.  
  1674. • Modes. As have been discussed in the previous section, a mode gives Alpha 
  1675. some functionality useful for editing text for a particular purpose, for 
  1676. example writing code in various programming languages.
  1677.  
  1678. • Menus. A menu is a package which attaches an extra menu to the menu bar.
  1679.  
  1680. • Features. A feature gives you some more functionality without attaching a 
  1681. menu to the menu bar. However, some features adds a new submenu to a menu 
  1682. or some new menu items to a menu.
  1683.  
  1684. In practice the only difference between 'menus' and 'features' is that 
  1685. 'menus' have their own menus in the menu bar.
  1686.  
  1687.  
  1688. Menus and features can be activated and deactivated either globally or for
  1689. specific modes.  This is done using the menu items
  1690.  
  1691.     "Config --> Preferences --> Menus"
  1692.     "Config --> Preferences --> Features"
  1693.  
  1694.     "Config --> Mode Prefs --> Menus"
  1695.     "Config --> Mode Prefs --> Features"
  1696.  
  1697. Some packages are also enabled through "Interface" or "Input-Output" 
  1698. preferences under the "Config --> Preferences" menu.
  1699.  
  1700.  
  1701.           Menus and Features
  1702.  
  1703.  
  1704. Activating a menu or feature makes the functionality provided by the menu
  1705. or feature available until it is deactivated.  Alpha remembers which ones
  1706. are active next time you run Alpha.  Once a menu or feature is deactivated
  1707. it does not affect Alpha's behavior at all.  It is then as if it did not
  1708. exist.  Note, however, that in some cases you the package is not
  1709. deactivated until you restart Alpha.
  1710.  
  1711. The page for menus is divided into two sections.
  1712.  
  1713. • Usual menus. These are menus designed to be used globally.  These include
  1714.  
  1715.   package: alphaDeveloperMenu
  1716.   package: codewarriorMenu
  1717.   package: colorMenu
  1718.   package: cvsMenu
  1719.   package: electricMenu
  1720.   package: filesetMenu
  1721.   package: filtersMenu
  1722.   package: frontierMenu
  1723.   package: ftpMenu
  1724.   package: internetConfigMenu
  1725.   package: makeMenu
  1726.   package: thinkMenu
  1727.   package: thinkRefMenu
  1728.   package: toolboxRefMenu
  1729.   package: versionControlMenu
  1730.   package: voodooMenu
  1731.   package: wwwMenu
  1732.  
  1733. • Other possible menus. These are menus designed to be used in a specific 
  1734.   mode or modes.  These include
  1735.  
  1736.   package: bibtexMenu            for Bib mode 
  1737.   package: calcMenu              for Calc mode 
  1738.   package: camlMenu              for Caml mode 
  1739.   package: cssMenu               for CSS mode 
  1740.   package: diffMenu              for Diff mode 
  1741.   package: eudoraMenu            for Mail mode 
  1742.   package: gnuplotMenu           for GPLT mode 
  1743.   package: htmlMenu              for HTML mode 
  1744.   package: htmlUtilsMenu         for HTML mode 
  1745.   package: igorMenu              for Igor mode 
  1746.   package: installMenu           for Inst mode 
  1747.   package: javaMenu              for Java mode 
  1748.   package: lispMenu              for Lisp mode 
  1749.   package: MATLMenu              for MATL mode 
  1750.   package: mfMenu                for Mf mode 
  1751.   package: perlMenu              for Perl mode 
  1752.   package: sasMenu               for SAS mode 
  1753.   package: scilabMenu            for Scil mode 
  1754.   package: sMenu                 for S mode 
  1755.   package: spssMenu              for SPSS mode 
  1756.   package: stataMenu             for Stta mode 
  1757.   package: tclMenu               for Tcl mode 
  1758.   package: texMenu               for TeX mode  
  1759.  
  1760. Thus, normally it is a good idea to only choose between the menus in the
  1761. section 'Usual menus'.  Although it is possible to activate the other menus
  1762. globally, they are usually of no use outside the mode or modes they are
  1763. designed for.  See the "Packages" file for the current list of menus 
  1764. available.
  1765.  
  1766. The page for features are similarly divided into two sections.
  1767.  
  1768. • Usual features. These are features designed to be used globally.
  1769. • Other possible features. These are features designed to be used in a 
  1770.   specific mode or modes.
  1771.  
  1772. Also in this case it usually only make sense to choose between the ones in
  1773. the section 'Usual features'.  See the "Packages" file for the current list
  1774. of features available.
  1775.  
  1776.  
  1777.     ----------------------------------------------------------------------
  1778.  
  1779.  
  1780.           Electrics - automatic typing by Alpha
  1781.         
  1782.  
  1783. The term "electric" is used in the sense of "automatic, power assisted 
  1784. behavior", which is intended to save time, keystrokes, and brainpower. All 
  1785. the "electric" features are features, which makes Alpha do automatic typing 
  1786. for you. The exact behavior is mode dependent. 
  1787.  
  1788. The items described below can be enabled globally using the menu item
  1789. 'Config --> Preferences --> Interface Preferences'.  To turn off a global
  1790. preference for a specific mode, use 'Config --> Mode Prefs --> Features…'
  1791. (See the item "Turn Items Off".)
  1792.  
  1793. Many modes specify one or more of these items, which can be reviewed (and
  1794. turned off) in the dialog 'Config --> Mode Prefs --> Preferences…'.
  1795.  
  1796.  
  1797.                Electric return
  1798.  
  1799.  
  1800. Enabling the 'Electric Return' feature tells Alpha to indent the following 
  1801. line automatically whenever you press return.
  1802.  
  1803.  
  1804.                Electric braces
  1805.  
  1806.  
  1807. Enabling the 'Electric Braces' feature tells Alpha to treat the left or 
  1808. right brace '{', '}' keys as special keypresses which enter the '{' or '}' 
  1809. character, followed by a return and then indent the following line 
  1810. correctly. It is useful for those programming modes in which '{' and '}' 
  1811. are used to delineate blocks of code in 'for' loops or 'if-then-else' 
  1812. groups etc.
  1813.  
  1814. If you only want a '{' or '}' without the electric behavior, type option-{ 
  1815. or option-}.
  1816.  
  1817.  
  1818.                Electric semicolon
  1819.  
  1820.  
  1821. Enabling the 'Electric Semicolon' feature tells Alpha to treat the 
  1822. semicolon keys ';' as special keypresses which enters the ';' character 
  1823. followed by a return and then indents the following line correctly. It is 
  1824. useful for some programming modes in which ';' normally ends a line. The 
  1825. ';' key is context-dependent so you can still enter a for( ; ; ) loop in C 
  1826. mode (for instance) without Alpha messing things up.
  1827. If you want a ';' without the electric behavior, type option-;.
  1828.  
  1829.  
  1830.                Electric colon
  1831.  
  1832.  
  1833. Enabling the 'Electric Colon' feature tells Alpha to indent lines ending by 
  1834. a colon differently. This is for those programming modes which uses 
  1835. switch-case statements like e.g. C/C++, Java, and JavaScript.
  1836.  
  1837.  
  1838.                Electric tab
  1839.  
  1840.  
  1841. Enabling the 'Electric Tab' feature allows Alpha you to use the functions 
  1842. 'Indent or Next Stop' and 'Complete or Tab' as any of your 'Special Keys' 
  1843. bindings. By default 'tab' is invokes the function 'Indent or Next Stop', 
  1844. but there is no key which invokes 'Tab or Complete'.
  1845. Indent or Next Stop will first look forward for a template stop '•'. If one 
  1846. is found Alpha jumps to it and deletes it. If no • is found Alpha will 
  1847. instead indent the current line.
  1848. Complete or Tab will make an electric completion.
  1849. If you want to insert a normal 'tab', type option-tab.
  1850.  
  1851.  
  1852.                Electric completions
  1853.  
  1854.  
  1855. Enabling the 'Elec Completions' feature gives you a set of features to save 
  1856. you key strokes. When you invoke it Alpha tries to expand what you have just 
  1857. typed to give the rest of what you want. Electric completion is invoked by 
  1858. typing control-tab or F1. The documentation will always refer to 
  1859. control-tab as being the key combination for electric completion.
  1860.  
  1861. Electric completions and expansions are enabled globally in the dialog
  1862. 'Config --> Preferences --> Features…'.  See the "ElecCompletions Help"
  1863. file for more information.  Once these features have been turned on, you
  1864. could learn more about them by taking the quick "Text Tutorial".
  1865.  
  1866. Some modes also have their own tutorial how to use completions in the mode,
  1867. opened with "Config --> Mode Prefs --> Completions Tutorial".  See also the
  1868. documentation for the mode.  To see a list of all mode-specific completions
  1869. tutorials available, see the "Packages" file.
  1870.  
  1871. Alpha can complete what you just have typed in several different ways, and 
  1872. the behavior vary from mode to mode. In many modes Alpha tries a set of 
  1873. different ways to complete and continues until one of them succeed (or all 
  1874. fails). Let us start with the simplest kind of completion, but which 
  1875. normally is tried last when everything else has failed.
  1876.  
  1877. Word completion: Type the first few letters of a word and hit control-tab 
  1878. (or F1). Alpha will then search the document for a word which begins with 
  1879. these letters. If one is found Alpha completes the word you have just typed 
  1880. the first letters of. If this is not the word you want, hit control-tab 
  1881. again and Alpha continues searching for another one beginning with the same 
  1882. letters. Hitting control-tab repeatedly will cycle through all words in the 
  1883. document beginning with these letters until no more such word is found. 
  1884. Alpha always starts searching backwards from the point where you are until 
  1885. is reaches the top of the document, then is continues searching forwards 
  1886. from the point where you are until the end of the document.
  1887.  
  1888. An example: Typing 'com' right here and hitting control-tab will expand 
  1889. this to 'completes', which is the first word beginning by 'com' found above. 
  1890. Hitting control-tab again without moving the insertion point will expand it 
  1891. it 'completes', which is the next word beginning by 'com' found above.
  1892.  
  1893. Command template completion: For for loops, if statements and similar 
  1894. constructs used in programming languages Alpha can insert a template. As 
  1895. an example let's make an 'if' template for C, C++, Java, and other 
  1896. languages using the same construct. Simply type 
  1897.  
  1898.     if
  1899.  
  1900. (when Alpha is in C, C++, or Java etc. mode!) and hit control-tab. Alpha 
  1901. then inserts a template
  1902.  
  1903.     if (|){
  1904.         •
  1905.     } •
  1906.  
  1907. with the insertion point between the parentheses. The bullets '•', which 
  1908. are inserted are called template stops. When you hit tab, Alpha jumps to 
  1909. the next template stop and deletes. To use the template first type the 
  1910. condition and then hit tab. Alpha the jumps to the first bullet and deletes 
  1911. it. Then type the body of the if statement and finally hit tab again to 
  1912. jump to the last template stop. Note! The feature 'Electric tab' must be 
  1913. enabled for the mode in question to be able to jump between the template 
  1914. stops with tab, see below.
  1915.  
  1916. This section has only been a short introduction to electric completions. 
  1917. More detailed help is found in "ElecCompletions Help". 
  1918.  
  1919.  
  1920.                Electric expansions
  1921.  
  1922.  
  1923. Enabling the 'Elec Expansions' feature provides you with a special kind of 
  1924. word completion. When you find yourself typing a lot of variable and 
  1925. function names over and over, and these names are word-combinations where 
  1926. the name is formed by either capitalizing each word or separating them with 
  1927. an underscore, just type the initial letter of each word and invoke 
  1928. electric expansion instead. This is often shorter and more natural than 
  1929. typing a few letter and using electric completions to make a word 
  1930. completion. Electric expansion is invoked by typing command-space.
  1931.  
  1932. The string you are going to use expansion on is entered in lowercase. The 
  1933. words in the target you are trying to hit have to start with a capital 
  1934. (except the first word), or, be separated by an underscore.
  1935.  
  1936. The hint can be embedded between non-alphabetic characters and certain 
  1937. punctuation marks ( '[', '(', '{', ',', ';', ':', ''', '"', ']', ')', '}' 
  1938. ). The expanded hint remains so embedded, and the cursor appears one space 
  1939. beyond the trailing punctuation.
  1940.  
  1941. An example: Let's say there is a word 'someLongWord' in the file. Then 
  1942. typing 'slw' and hitting command-space will expand 'slw' to 'someLongWord'.
  1943.  
  1944. Another example: Let's say there is a word 'some_long_word' in the file. Then 
  1945. typing 'slw' and hitting command-space will expand 'slw' to 'some_long_word'.
  1946.  
  1947. This section has only been a short introduction to electric expansions. 
  1948. More detailed help is found in "ElecCompletions Help". Some modes may also 
  1949. their own special expansions features, see the help files for the respective 
  1950. modes.
  1951.  
  1952.  
  1953.                Special keys dialog
  1954.  
  1955.  
  1956. The dialog "Config --> Special Keys…" is used to define the keys which
  1957. activate the electric completion and expansion functions and which let
  1958. you jump between the template stops. You can define keys for the following
  1959. functions:
  1960.  
  1961. Function                Action
  1962. --------                ------
  1963. Expand                  Electric expansion.
  1964. Next stop or indent     Alpha first looks forward for a template stop '•'. 
  1965.                         If one is found Alpha jumps to it and deletes it. 
  1966.                         If no • is found Alpha will instead indent the 
  1967.                         current line. This requires that 'electric tab' is 
  1968.                         enabled, otherwise a tab is inserted.
  1969. nth Stop                Jumps to the nth template stop.
  1970. Complete or Tab         If 'electric tab' is enabled Alpha will make an 
  1971.                         electric completion, otherwise a tab is inserted.
  1972. Next stop               Jump to the next template stop '•' and delete it.
  1973. Clear all stops         Delete all template stops '•' in the window.
  1974. Complete                Electric completion.
  1975. Real tab                Inserts a tab.
  1976. Prev stop               Jump to the closest template stop '•' before the 
  1977.                         current position and delete it.
  1978.  
  1979. There are two predefined sets of key bindings for these functions. The 
  1980. alternative set is define to use key bindings like those which are used in 
  1981. Emacs. In the dialog "Config --> Special Keys…" you can choose one of these 
  1982. two sets of bindings or define your own.
  1983.  
  1984. Function                Default binding             Alternative binding
  1985. --------                ---------------             -------------------
  1986. Expand                  command-space               command-space
  1987. Next stop or indent     tab                         no binding
  1988. nth Stop                no binding                  control-tab
  1989. Complete or Tab         no binding                  tab
  1990. Next stop               no binding                  control-j
  1991. Clear all stops         shift-control-tab           shift-control-tab
  1992. Complete                control-tab                 no binding
  1993. Real tab                option-tab                  option-tab
  1994. Prev stop               shift-tab                   shift-control-j
  1995.  
  1996.  
  1997.     ----------------------------------------------------------------------
  1998.  
  1999.  
  2000.           Regular Expressions
  2001.  
  2002.  
  2003. Many packages use 'Regular Expressions' in their procedures.  Here's a
  2004. summary of how regular expressions work in Alpha (but see also the help
  2005. file "Regular Expressions".)
  2006.  
  2007. Regular expressions are used to find the part of a string which matches a 
  2008. certain pattern.
  2009.  
  2010. A regular expression is zero or more branches, separated by `|'. It matches
  2011. anything that matches one of the branches.
  2012.  
  2013. A branch is zero or more pieces, concatenated. It matches a match for the
  2014. first, followed by a match for the second, etc.
  2015.  
  2016. A piece is an atom possibly followed by `*', `+', or `?'. An atom followed
  2017. by `*' matches a sequence of 0 or more matches of the atom. An atom
  2018. followed by `+' matches a sequence of 1 or more matches of the atom. An
  2019. atom followed by `?' matches a match of the atom, or the null string.
  2020.  
  2021. An atom is a regular expression in parentheses (matching a match for the
  2022. regular expression), a range (see below), `.' (matching any single
  2023. character), `^' (matching the null string at the beginning of the input
  2024. string), `$' (matching the null string at the end of the input string), a
  2025. `\' followed by a single character (matching that character), or a single
  2026. character with no other significance (matching that character).
  2027.  
  2028. A range is a sequence of characters enclosed in `[]'. It normally matches
  2029. any single character from the sequence. If the sequence begins with `^', it
  2030. matches any single character not from the rest of the sequence. If two
  2031. characters in the sequence are separated by `-', this is shorthand for the
  2032. full list of ASCII characters between them (e.g. `[0-9]' matches any
  2033. decimal digit). To include a literal `]' in the sequence, make it the first
  2034. character (following a possible `^'). To include a literal `-', make it the
  2035. first or last character.
  2036.  
  2037. If a regular expression could match two different parts of the input
  2038. string, it will match the one which begins earliest. If both begin in the
  2039. same place but match different lengths, or match the same length in
  2040. different ways, life gets messier, as follows.
  2041.  
  2042. In general, the possibilities in a list of branches are considered in
  2043. left-to-right order, the possibilities for `*', `+', and `?' are considered
  2044. longest-first, nested constructs are considered from the outermost in, and
  2045. concatenated constructs are considered leftmost-first. The match that will
  2046. be chosen is the one that uses the earliest possibility in the first choice
  2047. that has to be made. If there is more than one choice, the next will be
  2048. made in the same manner (earliest possibility) subject to the decision on
  2049. the first choice. And so forth.
  2050.  
  2051. For example, `(ab|a)b*c' could match `abc' in one of two ways. The first
  2052. choice is between `ab' and `a'; since `ab' is earlier, and does lead to a
  2053. successful overall match, it is chosen. Since the `b' is already spoken
  2054. for, the `b*' must match its last possibility-the empty string-since it
  2055. must respect the earlier choice.
  2056.  
  2057. In the particular case where no `|'s are present and there is only one `*',
  2058. `+', or `?', the net effect is that the longest possible match will be
  2059. chosen. So `ab*', presented with `xabbbby', will match `abbbb'. Note that
  2060. if `ab*' is tried against `xabyabbbz', it will match `ab' just after `x',
  2061. due to the begins-earliest rule. (In effect, the decision on where to start
  2062. the match is the first choice to be made, hence subsequent choices must
  2063. respect it even if this leads them to less-preferred alternatives.)
  2064.  
  2065. To summarize, regular expressions are built up of the following pieces:
  2066.  
  2067.  c        literal char.
  2068.  ^        beginning of line.
  2069.  $        end of line.
  2070.  .        any character except carriage return.
  2071.  [...]    character class, can use ranges such as '0-9'.
  2072.           inside classes. Matches one character of the 
  2073.           enclosed choices. Ex: '[ac0-2]' matches 'a', 
  2074.           'c', '0', '1', or '2'.
  2075.  [^...]   negated character class, matches anything but
  2076.           the enclosed characters. ']' can be included
  2077.           by putting it immediately after the '^'.
  2078.  \t       tab.
  2079.  \r       carriage return or line break.
  2080.  *        zero or more occurrences of the previous
  2081.           pattern. Ex: 'ab*' matches 'a', 'ab', 'abb',
  2082.           'abbb' etc.
  2083.  +        one or more occurrences of the previous 
  2084.           pattern. 
  2085.  ?        zero or one occurrences of the previous 
  2086.           pattern. Ex: 'ab?' matches 'a' or 'ab'.
  2087.  a|b      matches either a or b. If enclosed in
  2088.           parenthesis, the extent of the alternated
  2089.           expressions is limited. Ex: (pete|bob) 
  2090.           matches either 'pete' or 'bob'.
  2091.  (...)    The interior elements are grouped together. 
  2092.  
  2093. Regular expressions constructed from the above elements can be 
  2094. concatenated to create larger expressions. 
  2095.  
  2096. The parenthesis also define substrings of the total matched string that 
  2097. can be used either later during substitution. The substring delimited by 
  2098. the pair of parenthesis that includes the nth left paren is denoted \n, 
  2099. where n is 1, 2, .... 9.  '\0' and '&' both refer to the matched text.
  2100.  
  2101. [examples to be added]
  2102.  
  2103.  
  2104.     ----------------------------------------------------------------------
  2105.  
  2106.  
  2107.           File Patterns
  2108.         
  2109.  
  2110. Some functions require that you give a file pattern which specifies a set 
  2111. of file names, e.g. if you want to change the suffix mappings you must give 
  2112. a pattern specifying which files should be opened in a certain mode, and as 
  2113. another example if you want to create a fileset you must give a pattern 
  2114. specifying which files should belong in the fileset.
  2115.  
  2116. A file pattern is given as a string including special characters, which 
  2117. allow automatic substitution of characters in file names.
  2118.  
  2119.     ?           Matches any single character.
  2120.  
  2121.     *           Matches any sequence of zero or more characters.
  2122.  
  2123.     [chars]     Matches any single character in chars. If chars contains a 
  2124.                 sequence of the form a-b then any character between a and b 
  2125.                 (inclusive) will match. To match '-' give it as the first 
  2126.                 character between the brackets.
  2127.  
  2128.     \x          Matches the character x. This is useful if you want to 
  2129.                 match any of the special characters, e.g to matching '*' is 
  2130.                 done by the pattern '\*'.
  2131.     
  2132.     {a,b,...}   Matches any of the strings a, b, etc.
  2133.  
  2134. Some examples of how to use file patterns:
  2135.  
  2136. • To match any file ending by '.c' use the pattern '*.c'. This will match 
  2137. files with names like 'blah.c' 'bladdity.c' 'gghjcdhj.c'.
  2138.  
  2139. • To match any file ending by '.c' or '.h' use the pattern '*.{c,h}'. This 
  2140. will match files with names like 'blah.c' 'blah.h' 'bladdity.c' 
  2141. 'bladdity.h'.
  2142.  
  2143. • Lets say you have files with names 'chapter1.tex', 'chapter2.tex' through 
  2144. 'chapter50.tex'. To match the first 9 chapters you could use the pattern 
  2145. 'chapter?.tex' This will match the files 'chapter1.tex' through 
  2146. 'chapter9.tex'. Another pattern which would match the same files is 
  2147. 'chapter[1-9].tex'.
  2148.  
  2149. • To match the files 'chapter1.tex' through 'chapter9.tex' and 
  2150. simultaneously files 'chapter1.log' through 'chapter9.log' you can use the 
  2151. pattern 'chapter[1-9].{tex,log}'
  2152.         
  2153.  
  2154.           Marks
  2155.  
  2156.  
  2157. Alpha allows the user to use "marks" to remember positions in files. Marks
  2158. "float". That is, if a mark is initially at position 312 and then five
  2159. characters are inserted at location 297, the mark's new value will be 317.
  2160. Alpha uses three different types of marks.
  2161.  
  2162. The first is generically referred to as "the mark". The mark is set to the
  2163. current insertion point by the command 'Set Mark' (control-space). (This
  2164. requires that the Emacs feature is active.) The position in the file
  2165. indicated by the blinking cursor is referred to as the current insertion
  2166. point. Many commands (such as "cut" and "copy") can operate either on the
  2167. currently selected (hilighted) text, or the text between the current
  2168. insertion point and "the mark". 
  2169.  
  2170. For example, if you move the cursor to the beginning of the word
  2171. "allybaba", hit control-space (the status bar should say "Mark set"), move
  2172. to the end of the word and hit option-W (the status bar should say "Region
  2173. copied"), the effect is the same as if you had used the mouse to select the
  2174. text and then selected the "Copy" command from the "Edit" menu.
  2175.  
  2176. The second type of mark are the permanent marks. Permanent marks are set,
  2177. removed, and moved-to through the three corresponding menu items in the
  2178. "Search --> Named Marks" menu. Permanent marks differ from the generic mark in
  2179. that they have names, there can be any number of them, and they are saved
  2180. in the resource fork if the file is subsequently saved.
  2181.  
  2182. Permanent marks can be accessed via the "Search --> Named Marks" menu items,
  2183. by a popup menu called by mousing down on the M icon above a vertical
  2184. scrollbar, or by command-mousing on a window's titlebar.
  2185.  
  2186.  
  2187.           File Comparison
  2188.  
  2189.  
  2190. With Alpha you can compare files and display the differences in them. 
  2191. Among other things, this allows you to easily pinpoint what has changed
  2192. between two different versions of the same file.  The "Utils --> Compare"
  2193. menu items allow you to either compare the two topmost windows, or two
  2194. arbitrary files or two entire folders.  In the case of two folders each
  2195. pair of files with identical names in the two folders are compared.  It is
  2196. also indicated which files are only found in one of the folders.
  2197.  
  2198. The comparison is done using a port of the unix GNU diff program.
  2199.  
  2200. Alpha opens the two files in windows at the top of the screen with the diff 
  2201. file at the bottom. You can navigate between individual differences in the 
  2202. diff file by using the Up and Down arrows. The section of the files which 
  2203. differ are then selected in the two files.
  2204.  
  2205. This section has only been a short introduction to the use of file 
  2206. comparison with Alpha. Read more in the file "Diff Help"
  2207.  
  2208. Bugs: File comparison only works if the files have Mac line terminations.
  2209.  
  2210.  
  2211.           Backups
  2212.  
  2213.  
  2214. Alpha can automatically make a backup copy for you of the old version of a
  2215. file whenever you save changes.  This is done if you check 'Backup' in the
  2216. preferences dialog "Config --> Preferences --> Backups".  By default the
  2217. backup file is saved in the same folder, and its name is formed by
  2218. suffixing a tilde to the name of the saved file.  The backup behavior can
  2219. be modified by changing the following preferences found in the dialog
  2220. "Config --> Preferences --> Backups":
  2221.  
  2222.     Backup              
  2223.  
  2224. Check this if you want Alpha to make backups.
  2225.  
  2226.     Backup Folder       
  2227.  
  2228. The folder where to save the backups.  If none specified the backups are
  2229. saved in the same folder as the original.
  2230.  
  2231.     Backup Extension    
  2232.  
  2233. The extension to add to name of the backup file.  Don't pick a long
  2234. extension!  The total file name mustn't be more than 31 characters.
  2235.  
  2236.     Backup Age Requirement In Hours     
  2237.  
  2238. A new backup file is only created if the old backup file is older than
  2239. this.
  2240.  
  2241.  
  2242. If you have chosen a backup folder and want to go back to the default
  2243. behavior of saving the backup in the document's folder this is how to do
  2244. it:
  2245.  
  2246. Delete or rename the backup folder. Alpha will then ask you if you want to 
  2247. create the backup folder. If you answer 'No' Alpha will revert to the 
  2248. default behavior.
  2249.  
  2250.  
  2251.                Auto saving
  2252.  
  2253.  
  2254. Alpha can automatically save the documents for you after a certain number
  2255. of changes.  This is done if you check 'Auto Save' in the preferences
  2256. dialog "Config --> Preferences --> Backups".  Alpha then saves the
  2257. documents every 'Changes Lim' changes.  'Changes Lim' can be set in the
  2258. same preferences dialog.  Note that Untitled windows are not autosaved.
  2259.  
  2260.  
  2261.           Tags
  2262.  
  2263.  
  2264. Alpha supports the use of tags to find declarations of functions; by
  2265. default this is set up only for 'C'. When searching for a tag, Alpha looks
  2266. for the tag file specified by the 'Tag File' preference, which can be set
  2267. in the dialog "Config --> Preferences --> Tags". Alpha's tag generating routines
  2268. use the regular expression in the preference 'Func Expr' to look for
  2269. function declarations. In other words, we don't parse the text. If you
  2270. declare your functions differently, you can change 'Func Expr' to suit your
  2271. own style. Alpha currently uses the following regular expression to find C
  2272. function declarations:
  2273.  
  2274.     ^[^ \t\(#\r/@].*\(.*\)$
  2275.  
  2276. Although complicated, this expression makes sense if you slowly wade
  2277. through it.  The string that we are looking for must take up an entire
  2278. line.  It must begin with a character other than '\t', '#', '\r', '/', ' ',
  2279. '(', or '@'.  There must be a set of parenthesis.
  2280.  
  2281. Note that not only can you customize this to your style of 'C'
  2282. declarations, you could also use it to generate tags for other languages. 
  2283. The only thing you need to bear in mind is that the tag routines use the
  2284. complete word previous to the first '(' in the selected line as the
  2285. function's name.  If there is no '(' in the selected line, the last word in
  2286. the line is used.  Therefore, Pascal procedures with or without parameters
  2287. can be identified.
  2288.  
  2289. Caveat: Apple's list manager can't handle more than 32k of text in the
  2290. entire list, so there is a practical limit of 2000 or so tags in your
  2291. project.
  2292.  
  2293.  
  2294.           Calculator
  2295.  
  2296.  
  2297. Alpha has its own calculator. This is just a quick-and-dirty RPN stack
  2298. calculator, which works on both signed and unsigned decimals, hex integers,
  2299. and floating point.  See the "Calculator Help" file for more information.
  2300.  
  2301.  
  2302.           
  2303.     ======================================================================
  2304.  
  2305.  
  2306. This last major section of the Alpha Manual ...
  2307.  
  2308. concerns upgrading or otherwise enhancing Alpha, either by installing new
  2309. packages written by various Alpha users and developers, or by writing your
  2310. own packages.
  2311.  
  2312.  
  2313.           Installing New Packages
  2314.         
  2315.  
  2316.                Where to find new packages
  2317.  
  2318.  
  2319. Currently the best place to look for new packages is 
  2320.  
  2321.     <ftp://ftp.ucsd.edu/pub/alpha/>.
  2322.  
  2323. For those from Europe, you may wish to try the mirror: 
  2324.  
  2325.     <ftp://anu.theologie.uni-halle.de/comp/mac/Alpha>
  2326.  
  2327.  
  2328.                What is already installed?
  2329.  
  2330.  
  2331. It is obviously a waste of time to install something which is already
  2332. installed or - worse - to install an old package replacing a more recent
  2333. version.  The "Packages" help file lists all packages which are installed. 
  2334. The list contains the package names, versions, and maintainers.  This file
  2335. can be updated at any time with the "Config --> List Packages" menu item.
  2336.  
  2337. If there is no version number listed in the "Packages" file for the package
  2338. you are about to install, you can find the version number in the beginning
  2339. of the tcl file.  Look for a line of one of the forms:
  2340.  
  2341.     alpha::extension <name> <version> ...
  2342.     alpha::menu <name> <version> ...
  2343.     alpha::mode <name> <version> ...
  2344.  
  2345. Make a sure the number given by <version> is higher than the one for the 
  2346. currently installed package.
  2347.  
  2348.  
  2349.                Installing
  2350.  
  2351.  
  2352. How to start the installation depends on if the package you are about to 
  2353. install is accompanied by a file 'READ ME TO INSTALL' (or similar) or is 
  2354. just a single file someName.tcl.
  2355.  
  2356. • If there is a file 'READ ME TO INSTALL', open it (hence the name!).  All
  2357. packages built up of more than one file must actually have such a read me
  2358. file in order to be possible to install.  If there is a file
  2359. installScript.tcl (or similar), don't open it.  It only contains
  2360. instructions to Alpha what to install.
  2361.  
  2362. • If there is only a single file someName.tcl, open it.  Some single file
  2363. package are configured to automatically close themselves and open a
  2364. installation dialog.  Otherwise proceed as below.
  2365.  
  2366. If there are instructions in the read me file how to install the package,
  2367. follow them (of course!).  In other cases this is how a typical
  2368. installation is made.
  2369.  
  2370. • After you have open the read me file or the single someName.tcl, make
  2371. sure Alpha has inserted a menu 'Install' in the menu bar.  This means Alpha
  2372. is in installation mode.  If not, you can manually switch to installation
  2373. mode by selecting 'Inst' in the mode popup menu in the statusbar.
  2374.  
  2375. • Select 'Install --> Install This Package' from the Install menu.
  2376.  
  2377. • An installation dialog is now opened.  Here you can choose to make an
  2378. Easy Install or a Custom Install.  The Custom Install lets you choose
  2379. exactly what to install.  The Easy Install installs everything.  If you are
  2380. not sure which files you need use the Easy Install.
  2381.  
  2382. • There are also three options in the installation dialog.
  2383.  
  2384. If 'Backup removed files' is checked Alpha will save any removed file in a
  2385. folder InstallationBackup in Alpha's folder.  This as a safety measure so
  2386. you can recover any changes you may have made to them or so you can switch
  2387. back to them if the newly installed package doesn't work as you wish.
  2388.  
  2389. If 'Show installation log' is checked a window is opened after installation
  2390. showing which files have been put where and which files have been deleted.
  2391.  
  2392. If 'Force overwrite, even of newer files' is checked then newer existing 
  2393. files will be replaced by those you are about to install. 
  2394.  
  2395. After Alpha has put the files in there correct location Alpha rebuilds its
  2396. index files.  This make take a little while.  The index files are used by
  2397. Alpha to keep track of where the various packages and function are.
  2398.  
  2399. After the installation is completed you must quit and restart Alpha.
  2400.  
  2401.  
  2402.                If something goes wrong
  2403.  
  2404.  
  2405. What to do if you're unlucky and have installed a package which simply
  2406. doesn't work, possibly crashing Alpha when it's launched?  The obvious
  2407. thing is then to uninstall the package.  If Alpha can be launched with the
  2408. new package installed you can uninstalling it using the method in the next
  2409. section.
  2410.  
  2411. If the newly installed package causes Alpha to crash when you launch it,
  2412. the situation is more problematic.  Then you have to manually delete some
  2413. files to make Alpha run again.  First delete the files you've just
  2414. installed.  During the installation the package's files are copied to
  2415. various locations in the folder "Tcl" inside Alpha's folder.  Locate and
  2416. delete the ones with the same names as the ones in the set of files you
  2417. installed.  Then before you launch Alpha again you have to delete a folder
  2418. from Alpha's preferences folder.  Alpha's preferences folder is called
  2419. "Alpha-v7" and is located in the Preferences folder in the system folder. 
  2420. Delete the folder "Cache" inside "Alpha-v7".  Deleting the folder "Cache"
  2421. is harmless.  It will be re-created the next time you launch Alpha.  It is
  2422. very likely, though, that the old content was causing Alpha to crash.
  2423.  
  2424. If this doesn't help, as a last way out try removing the complete
  2425. "Alpha-v7" from the Preferences folder.
  2426.  
  2427.  
  2428.           Uninstalling Packages
  2429.  
  2430.  
  2431. Many packages support a mechanism for uninstalling them.  Please note
  2432. before starting to uninstall packages you think you won't ever need that
  2433. the only thing you save by uninstalling a package is disk space - unless
  2434. you have installed some buggy package causing obvious problems.  Installed
  2435. packages which are not in use, i.e. either not enabled through the dialogs
  2436. 'Config --> Preferences --> Menus' / 'Config --> Preferences --> Features',
  2437. or modes which are not used, are never loaded into Alpha's memory.  Thus
  2438. you do not save any memory by uninstalling packages.  Thus if you have
  2439. plenty of disk space, there is hardly any point in uninstalling anything.
  2440.  
  2441. The menu item "Config --> Packages --> Uninstall Some Packages" uninstalls
  2442. packages.  Select the package you want to uninstall from the popup menu in
  2443. the dialog.  All files belonging to the package are now permanently
  2444. deleted.  Only a reinstallation will restore the package.
  2445.  
  2446. After the uninstallation you must restart Alpha.
  2447.  
  2448. If you can't find the package you want to uninstall in the popup menu, it
  2449. means that the package doesn't support the mechanism for automatic
  2450. uninstallation.  In this case the only way uninstall the package is to
  2451. manually find the files belonging to the package and delete them.  Don't
  2452. use this method unless you know what you are doing.  Deleting the wrong
  2453. files may result in all sorts of troubles.
  2454.  
  2455.  
  2456.           User Defined Key Bindings
  2457.  
  2458.  
  2459. Alpha allows you to customize the keystrokes you use to invoke editor
  2460. functions.  Any Tcl command can be bound to any single keystroke.  Key
  2461. bindings can be stored in a global "prefs.tcl" file, or if they are mode
  2462. specific, in a <mode>Prefs.tcl file.  The first item is available under the
  2463. menu item "Config --> Preferences --> Edit Prefs File".  This file will be
  2464. sourced upon every restart of Alpha.
  2465.  
  2466.  
  2467. Please see the help file "Default Key Bindings" for more information.
  2468.  
  2469.  
  2470.           Changing Alpha's behavior
  2471.         
  2472.  
  2473. The rest of the manual discusses some general topics about how to extend
  2474. Alpha by writing your own Tcl code.
  2475.  
  2476. First of all, where do you put your own Tcl code so that Alpha can find it? 
  2477. Alpha has a set of preferences files for this purpose.  There is one global
  2478. preferences file which is loaded when Alpha is launched.  In this file you
  2479. should put code which should be loaded regardless of which mode you're
  2480. working in.  This preferences file is opened / created using the menu item
  2481. "Config --> Preferences --> Edit Prefs File".
  2482.  
  2483. Then there is one preferences file for each mode.  The file for a mode is
  2484. loaded after as the last code to be loaded when a mode is used the first
  2485. time.  This preferences file can be opened /created using the menu item
  2486. "Config --> Mode Prefs --> Edit Prefs File".
  2487.  
  2488. These preferences files are intended for code for personal use. If you want 
  2489. to write a complete new package for Alpha, which others also can use, read 
  2490. the file "Extending Alpha".
  2491.         
  2492.  
  2493.           ALPHA-D mailing list
  2494.         
  2495.  
  2496. There is mailing list for Alpha where you can discuss problems, suggest new 
  2497. features etc. To subscribe, email <listserv@listserv.syr.edu> and, in the 
  2498. body of your message (not the subject line), write: 
  2499.  
  2500.     SUBSCRIBE ALPHA-D
  2501.  
  2502. There are a number of known bugs which will hopefully be corrected in a
  2503. future release.  PLEASE read the "Bug Reports and Debugging" file for a
  2504. list of known bugs, and for how to give an informative bug report, without
  2505. which it is unlikely any bug you found can be fixed.
  2506.         
  2507.  
  2508.     ----------------------------------------------------------------------
  2509.  
  2510.  
  2511.           Menus, user-defined
  2512.         
  2513.  
  2514. If you want to make your own menu with your personal Tcl functions, this
  2515. section explains how to do it.  If you want to add new menu items to the
  2516. existing menus, see the next section for instructions.  However, in that
  2517. case you also need to read this section.
  2518.  
  2519. Alpha's menu commands allow the user to build custom menus which contain
  2520. names of functions, macros, or arbitrary TCL commands that just HAVE to be
  2521. in the menus, as opposed to being merely callable through the bindings. 
  2522. The menu items are defined as a list of strings.  The following meta
  2523. characters can be embedded in the strings:
  2524.  
  2525.     Meta-character     Usage
  2526.     --------------     -----
  2527.  
  2528.     ; or Return       Separates multiple items.
  2529.     ^                 Followed by an icon number, adds 
  2530.                       that icon to the item.
  2531.     !                 Followed by a character, marks the
  2532.                       item with that character.
  2533.     <                 Followed by B, I, U, O, E, or S,  
  2534.                       sets the character style of the item.
  2535.     /                 Followed by a character, sets up
  2536.                       a keyboard equivalent.
  2537.     (                 Disables the item. Use (- to get a 
  2538.                       separator line.
  2539.  
  2540. The following modifiers can be used to require other combinations of
  2541. modifiers than just the command key.  Control-option, for instance, is
  2542. specified by putting the string "<B<I" in the menu item.  The menu symbol
  2543. for shift is an upward outline arrow, control is the outlined ^ symbol
  2544. ("Wins --> Iconify" has one), and option is the wavy line with the dot in
  2545. the upper right ("Search --> Replace All" has one).  The following are
  2546. characters that can follow the '<' and what they signify.
  2547.  
  2548.     B       - control key required
  2549.     I       - option key required
  2550.     U       - shift key required (only for alpha-numerics!)
  2551.     O       - command key required
  2552.     S       - is part of a dynamic item.
  2553.     E       - forces item to start new dynamic item.
  2554.  
  2555.  
  2556. A '/' followed by a character in the left column sets up a keyboard
  2557. equivalent for the key in the right column:
  2558.  
  2559.     a   Enter           n   F10
  2560.     b   Return          o   F11
  2561.     c   Tab             p   F12 
  2562.     d   Num Lock        q   F13
  2563.     e   F1              r   F14
  2564.     f   F2              s   F15
  2565.     g   F3              t   Help
  2566.     h   F4              u   Del
  2567.     i   F5              v   Forward Del
  2568.     j   F6              w   Home
  2569.     k   F7              x   End
  2570.     l   F8              y   Page Up
  2571.     m   F9              z   Page Down
  2572.     
  2573. The menu creation syntax is :
  2574.  
  2575.     Menu [-s] <-n name> <-i num> [-p procName] [-m] [-M <mode>] "Tcl list of menu items"
  2576.  
  2577. Where the arguments have the followings meanings:
  2578.  
  2579.   -s            Use system menu definition proc (faster).
  2580.   -i <num>      Resource id of icon suite to use for menu title.
  2581.   -n <name>     Name of menu.
  2582.   -m            No menu form. If not supplied, each menu item is split into 
  2583.                 words at each capitalized letter.
  2584.   -p <pname>    Rather that having alpha call a Tcl proc named by the menu 
  2585.                 item's text, this option tells Alpha to call the tcl proc 
  2586.                 named by 'pname' with two arguments: the menu name, and the
  2587.                 text of the menu item chosen.
  2588.   -M <mode>     Bindings only take effect in specified mode.
  2589.   
  2590. The 'Tcl list of menu items' can include another menu definition allowing
  2591. you to create hierarchical menus.  Once the menus are created, they can be
  2592. inserted and deleted from the menu bar by the syntax:
  2593.  
  2594.     insertMenu "name"
  2595.     removeMenu "name"
  2596.  
  2597. As alluded to above, Alpha attempts to make procedure names readable in the
  2598. menus by separating words at any capitalized letter.  For example,
  2599. 'findFile' becomes "Find File".  This function is turned off by the '-m'
  2600. option.
  2601.  
  2602. Menu items can be enabled and disabled through the TCL command
  2603. 'enableMenuItem'.  Menu items checkmarks can be turned on and off via
  2604. 'markMenuItem'.  Menu items can be appended via 'addMenuItem' and deleted
  2605. via 'deleteMenuItem'.  See the "Alpha Commands" help file for syntax.
  2606.  
  2607. As explained above, Alpha uses various keys to specify text style and key
  2608. equivalents.  Sometimes you may want these characters included in your text
  2609. literally.  If an ampersand ('&') is the last character in a menu item,
  2610. these special characters are not interpreted.
  2611.  
  2612. If an ellipsis ('…') is the last character in a menu item (except possible
  2613. for the above ampersand), it is stripped off before searching for the
  2614. function corresponding to the chosen item.
  2615.  
  2616.  
  2617.           Modifying Alpha's menus
  2618.         
  2619.  
  2620. Alpha's global menus and most mode menus can be modified using commands
  2621. menu::insert, menu::removeFrom, and menu::replaceWith.  The use of these
  2622. are explained in the section Adding items to global menus in the file
  2623. "Extending Alpha".
  2624.  
  2625.  
  2626.           Event hooks
  2627.         
  2628.  
  2629. When certain events occur.  e.g. when opening and closing windows, Alpha
  2630. calls an event hook.  You can register your own event hooks to add to the
  2631. default behavior when the corresponding event occurs.  Below is a table of
  2632. all available hooks.
  2633.  
  2634. To add your own hook there are two things you have to do.  First write a
  2635. proc to be called when some events occurs.  This proc must have the
  2636. parameters shown in the table.  Lets say you want to define a saveHook. 
  2637. Then define some proc
  2638.  
  2639.     proc mysaveHook {name}{
  2640.         .
  2641.         .
  2642.     }
  2643.     
  2644. The next thing you have to do is to register the proc.  This is done with a
  2645. line like:
  2646.  
  2647.     hook::register 'hook-name' 'your proc' 'mode' ?... 'mode'?
  2648.  
  2649. The optional mode parameters specify in which modes the hook will be
  2650. called.  If no mode parameters are given the hook will be called regardless
  2651. of the mode.  Avoid this unless absolutely necessary.
  2652.  
  2653. Let's assume that you want your hook to be called in TeX and Perl modes. 
  2654. To register it you would use the line:
  2655.  
  2656.     hook::register saveHook mysaveHook TeX Perl
  2657.  
  2658. Note, however, that a few hooks doesn't use the mode to determine when to
  2659. be called and should be registered slightly differently, see below.
  2660.     
  2661.  
  2662.                Window hooks
  2663.  
  2664.     Hook                                              Parameter(s)
  2665.  
  2666. • activateHook                                      path to file
  2667.   Called when a window is brought to front
  2668. • deactivateHook                                    path to file
  2669.   Called when a window is sent to back
  2670. • openHook                                          path to file
  2671.   Called when a window is opened
  2672. • closeHook                                         path to file
  2673.   Called when a window is closed
  2674. • saveHook                                          path to file
  2675.   Called when a window is saved
  2676. • saveasHook                                        path to old file, path to new file   
  2677.   Called when a window is saved as
  2678. • savePostHook                                      path to file
  2679.   Called after a window is saved
  2680.   
  2681.                Alpha hooks
  2682.  
  2683.     Hook                                              Parameter(s)
  2684.  
  2685. • startupHook
  2686.   Called at the end of startup
  2687. • quitHook
  2688.   Called when quitting Alpha
  2689. • suspendHook                                       an empty string
  2690.   Called when switching to another app
  2691. • resumeHook                                        an empty string
  2692.   Called when switching to Alpha from another app
  2693.   
  2694.                Mode hooks
  2695.  
  2696.     Hook                                              Parameter(s)
  2697.  
  2698. • mode::init
  2699.   Called the first time a mode is loaded
  2700. • changeMode                                        new mode
  2701.   Called when the mode is changed
  2702. • dialog::modifyModeFlags                           a string (title of dialog)
  2703.   Called after a mode prefs dialog is closed
  2704. • mode::editPrefsFile
  2705.   Called when a mode prefs file is opened 
  2706.   for editing
  2707.   
  2708.                Keyboard hooks
  2709.  
  2710.     Hook                                              Parameter(s)
  2711.  
  2712. • keyboard
  2713.   Called at startup and when the keyboard prefs 
  2714.   is changed
  2715. • removekeyboard
  2716.   Called when the keyboard prefs is changed
  2717.   
  2718. The keyboard hooks use the keyboard name (the ones in the keyboard popup
  2719. menu in the International preferences dialog) rather than the mode to
  2720. determine when to be called.  Thus to register a keyboard or removekeyboard
  2721. hook use lines like:
  2722.  
  2723.     hook::register 'hook-name' 'your proc' 'keyboard name' ?... 'keyboard name'?
  2724.  
  2725.                Miscellaneous hooks
  2726.  
  2727.     Hook
  2728.  
  2729. • launch
  2730.   Called when a helper app is launched by calling app::ensureRunning
  2731.   
  2732. The launch hook uses the application signature rather than the mode to
  2733. determine when to be called.  Thus to register a launch hook use a line
  2734. like:
  2735.  
  2736.     hook::register launch 'your proc' 'signature' ?... 'signature'?
  2737.  
  2738. • requireOpenWindowsHook    
  2739.   Called when opening and closing windows.
  2740.  
  2741. This hook is used to en-/disable meaningless menu items which would require
  2742. the presence of a certain number of windows to be active.  You can register
  2743. your own menu items using a line like:
  2744.  
  2745.     hook::register requireOpenWindowsHook [list menu item] N
  2746.  
  2747. where 'N' is the number of windows required (1 or 2 usually)
  2748.  
  2749. As an example, this is a line from Diff mode registering the item 'Compare
  2750. Windows' to require 2 open windows to be enabled.
  2751.  
  2752.     hook::register requireOpenWindowsHook [list compare windows] 2
  2753.  
  2754.  
  2755.     ----------------------------------------------------------------------
  2756.  
  2757.  
  2758.           modeCreator
  2759.  
  2760. The modeCreator array allow you to tell Alpha which mode to choose when you
  2761. open a window depending on which application has created the file.  Add to
  2762. this array with lines like:
  2763.  
  2764.     set modeCreator(<signature>) <mode>
  2765.     
  2766. 'Signature' is the signature of the application which has created the file
  2767. and 'mode' is the mode which you want Alpha set for the window.  For
  2768. example, to open all files created by Netscape in HTML mode use the line:
  2769.  
  2770.     set modeCreator(MOSS) HTML
  2771.     
  2772. Tip: To find the signature of an application, launch it, open the Tcl shell
  2773. (command-Y,) and type 'ps' at the prompt.  This will list all running
  2774. applications; the second column lists the signatures.
  2775.  
  2776. (Or click here --> <<shell; insertText "ps" ; Shel::carriageReturn>>)
  2777.  
  2778.  
  2779.           unixMode
  2780.  
  2781.  
  2782. When you open unix files where the first non-empty line reads
  2783. '#!/dir/subdir/command ...'  then Alpha tries to find a mode corresponding
  2784. to 'command'.  With the unixMode array you can tell Alpha which mode to
  2785. choose when opening such a file.  Add to this array with lines like:
  2786.  
  2787.     set unixMode(<command>) <mode>
  2788.     
  2789. where 'command' is the command in the line '#!/dir/subdir/command ...'  and
  2790. 'mode' is the mode which you want Alpha set for the window.  For example,
  2791. to make Alpha open files with a line '#!/dir/subdir/perl ...'  in Perl mode
  2792. use the line:
  2793.  
  2794.     set unixMode(perl) Perl
  2795.  
  2796.  
  2797.           Word breaking
  2798.  
  2799.         
  2800. Alpha allows you to redefine its internal notion of what a word is, through
  2801. the preferences 'Word Break', and 'Word Break Preface'.  'Word Break' is
  2802. set to a regular expression that defines a word to you.  'Word Break
  2803. Preface' should be a regular expression that matches exactly one of any
  2804. characters that are not in your word definition.
  2805.  
  2806. The value of 'Word Break' and 'Word Break Preface' are mode dependent, as
  2807. what is meant by a word may be different for different types of text.  For
  2808. example, in Text mode the default definition of 'Word Break' is '\w+'. 
  2809. This matches any contiguous sequence of contiguous alphanumeric characters.
  2810.  
  2811. The default value in Text mode for 'Word Break Preface' is '(\W)',
  2812. basically just the negation of any any of the characters in your 'Word
  2813. Break' definition.
  2814.  
  2815. The need for both these variables in backward searches can be seen as
  2816. follows.  Suppose your window's text is 'hey hello', and the current
  2817. insertion is between the two 'l's.  Now, searching backwards for the above
  2818. 'Word Break' definition will take the insertion to between the 'e' and the
  2819. first 'l', not really where we want to say is the start of the word.  By
  2820. contrast, if we search backwards for 'Word Break Preface' and 'Word Break'
  2821. concatenated together, and then move forward one character after a
  2822. successful search, we end up right before the 'h' in 'hello', just where we
  2823. want to be.
  2824.  
  2825. There are also two similar preferences 'Wrap Break' and 'Wrap Break
  2826. Preface' used for automatic word wrapping.  In Text mode their default
  2827. values are '[\w_]+' and '([^\w_])' meaning that wrapping should not occur
  2828. between alphanumeric characters or underscore.
  2829.  
  2830.  
  2831.     ======================================================================
  2832.  
  2833.  
  2834. Author: Peter Keleher
  2835.  
  2836. Contributors: This manual has been updated / revised by many helpful users
  2837. and developers over the years, as noted above.
  2838.  
  2839.     ----------------------------------------------------------------------
  2840.  
  2841. This file was last updated by Craig Barton Upright, Donavan Hall.
  2842.  
  2843. E-mail: <cupright@princeton.edu>
  2844.   mail: Princeton University,  Department of Sociology
  2845.         Princeton, New Jersey  08544
  2846.    www: <http://www.princeton.edu/~cupright/>
  2847.  
  2848. E-mail: <hall@magnet.fsu.edu>
  2849.